Skip to main content

Create an app and get a service key

Every SDK or REST call is made on behalf of an app registered in your tenant. An app has a client ID and a client secret. The SDK reads both, plus the endpoint URLs, from a single JSON file: the service key.

Owners only

Only users with the owner role can register and manage apps. The UI labels are quoted below.

1. Open the OAuth apps list​

Go to Admin → Security and scroll to the OAuth apps section.

2. Register the app​

Choose to register a new app. The dialog is titled Neue App registrieren ("Register new app").

FieldRequiredWhat to enter
App NameyesA recognisable name, for example Order Sync
Redirect URIyesWhere users return after login, for example http://localhost:3000/callback. Not used for server-to-server calls, but required by the form.
App URLnoLink to your app
Beschreibung (description)noFree text, Markdown supported

Confirm with Erstellen ("Create").

3. Copy the client ID and secret​

The dialog App erstellt ("App created") shows the Client ID and the Client Secret.

Copy the client secret now

The client secret is displayed once. Scenid keeps only a hash of it, so it cannot be shown again. Save it in a password manager or secret store before you close the dialog. If it gets lost, rotate the secret on the app card to get a new one.

The SDK does not use this secret. The service key in the next step contains its own credentials. Keep the client secret if you connect other OAuth clients to the app.

4. Generate the service key​

On the app card, choose the action to generate a service key. Scenid creates a separate secret for SDK use and downloads service-key.json.

If the app already has a service key, the admin UI asks for confirmation first, because generating a new one invalidates the old one.

The downloaded file looks like this:

service-key.json
{
"client_id": "5b8c1f0e-…",
"client_secret": "64 hex characters",
"issuer": "https://auth.scenid.cloud",
"auth_uri": "https://auth.scenid.cloud/oauth/authorize",
"token_uri": "https://auth.scenid.cloud/oauth/token",
"jwks_uri": "https://auth.scenid.cloud/oauth/.well-known/jwks.json",
"cloud_stack": "scenid.cloud"
}

All fields are described in the service key reference.

What the key can do​

An app with a service key can:

  • request machine tokens (client_credentials) to call Customers, Insights and Files as the app (sdk.asAdmin());
  • exchange user ID tokens (token exchange) to act as a signed-in user (sdk.asUser()), see User login;

Manage the app later​

ActionWhen
Rotate secretThe client secret leaked. Applies to the app's own secret, not the service key
Generate service keyThe service key leaked, or you need a fresh file. The previous key stops working
EditChange name, description, app URL, logo, redirect URIs
DeleteRemove the app, its consents and authorization codes

Security checklist​

  • Store service-key.json outside the repository, or in a secret manager. Add it to .gitignore.
  • Use one app per integration, so you can revoke access independently.
  • Never send the client secret to a browser or mobile app. Use a backend and the user login flow instead.