Skip to main content
The JTL platform uses different credentials and tokens depending on the integration type and API. This page explains what each one is, when to use it, and how to manage it. To obtain these tokens, see the OAuth 2.0 Flow page.

Credentials and Tokens at a Glance

Client Credentials

Client credentials identify your app on the JTL platform. Every registered app receives a pair: a Client ID (public) and a Client Secret (private). Together, they’re used to request access tokens from JTL’s identity provider.

Client ID

Your app’s public identifier. It’s safe to include in logs and non-sensitive contexts. The Partner Portal displays it on your app’s detail page, and you can view it at any time.

Client Secret

Your app’s private key, used alongside the Client ID to generate access token for your app. The Partner Portal displays it only once, immediately after registration.
The Client Secret is shown only once. Copy and store it securely at the moment of registration. If you lose it, you’ll need to regenerate it.

Regenerating a Lost Secret

The Partner Portal does not currently support in-place secret rotation. To regenerate, register a new app with the same manifest:
  1. Log in to the Partner Portal
  2. Click the + Create button. You’ll see a registration wizard
  3. Fill in the details or use the JSON Code Editor to paste the contents of your app.json file
  4. Click the app and copy the new Client Secret
  5. Update the secret in your app’s environment variables and redeploy.

Storage Best Practices

Access Token (JWT)

The access token is what your backend uses to authenticate API requests to JTL. You obtain it by sending your client credentials to JTL’s token endpoint via the client credentials grant.

Token Response

When you request an access token, JTL returns:

Using the Access Token

Include it in the Authorization header of every API request:

Token Lifecycle

Access tokens expire in approximately 1 hour (expires_in: 3599). Handle this as follows:
  • Cache the token: Don’t request a new one for every API call
  • Track expiry: Store the expires_in value and request a new token before it expires (for example, when less than 5 minutes remain)
  • Handle 401 responses: A 401 Unauthorized response typically means the token has expired. Request a new one and retry the request once.

App Token

App tokens identify which merchant and tenant is using your app. An app running inside the Cloud ERP gets one from the AppBridge. An app running on its own domain gets one by signing the merchant in against the platform identity provider. For implementation details, see App Token Authentication.

Decoded Structure

An app token is a JWT with three parts: header, payload, and signature.

Payload

Verification

App tokens must be verified server-side before any claim is trusted:
  • Fetch the identity provider’s public keys from ${issuer}/oauth/v2/keys. No credentials are needed.
  • Select the key whose kid matches the token header, and verify the signature
  • Confirm the issuer matches, and that exp is present and in the future
  • Confirm aud contains your app ID, so a token minted for another app is rejected
Never trust an app token without verifying it server-side. A token received from the client could be tampered with or minted for a different app. Verify the signature and the audience before acting on the payload.

API Key (OnPremise)

API keys are permanent credentials used only in the OnPremise deployment model. They are generated through a two-step registration process in the JTL-Wawi desktop application.

Key Characteristics

Like the Client Secret, the API key is displayed only once during registration. Store it securely immediately. If lost, you will need to go through the registration process again.
For the full OnPremise registration flow, see OAuth 2.0 Flow (OnPremise tab).

Token Comparison

Inspecting Tokens for Debugging

During development, you may need to read a token’s contents to confirm what’s inside. For the verification flow that backends should use in production, see App Token Authentication.
For quick inspection during development, you can use jwt.io to decode a non-sensitive test token and view its header and payload. Never paste production tokens, credentials, or other sensitive data into third-party tools.

What’s Next?

OAuth 2.0 Flow

How to obtain access tokens and API keys.

App Token Authentication

Verify app tokens, read the tenant from their claims, and map merchants to your records.

Error Handling

How to handle auth errors, expired tokens, and 401 responses.