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.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:- Log in to the Partner Portal
- Click the + Create button. You’ll see a registration wizard
- Fill in the details or use the JSON Code Editor to paste the contents of your
app.jsonfile - Click the app and copy the new Client Secret
- 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 theAuthorization 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_invalue and request a new token before it expires (for example, when less than 5 minutes remain) - Handle 401 responses: A
401 Unauthorizedresponse 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.Header
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
kidmatches the token header, and verify the signature - Confirm the issuer matches, and that
expis present and in the future - Confirm
audcontains 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
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.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.