Get a token, send it on every call
Orange uses short-lived JWT bearer tokens. You exchange a permanent API key/secret pair for a token, then attach that token to every request. Two steps, then you never touch your secret again until the token expires.
The token call
There's a single call — POST /token. Send the request below, get the response below.
The endpoints further down show only the fields each step needs.
Generate your API credentials
Your apiKey and apiSecret are created once in the dashboard and reused to
mint tokens.
- Sign in to the Orange dashboard.
- Open Settings → API Credentials.
- Click Generate New Credentials and store both values.
Request a token
Send your credentials in the body. You get back a token and its expiry (Unix
ms). No auth header on this call — it's how you get one.
curl -X POST \
'https://api.app.useorange.com/token' \
-H 'Content-Type: application/json' \
-d '{
"apiKey": "your-api-key",
"apiSecret": "your-api-secret"
}'Use the token
Attach it as a Bearer token in the Authorization header on every other
endpoint.
expiry. Minting a new token on every request is
unnecessary and rate-limited.curl 'https://api.app.useorange.com/merchants' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIs...'
Expiry & rotation
~1 hour lifespan
Tokens are valid for about an hour. Read the exact moment from expiry and refresh
just before it.
Deploys rotate the secret
We ship often and regenerate the signing secret on each deploy, so a token can die early. Build
for it: catch 401/403 and transparently re-auth.
Auth errors
Every error body is a bare { "message": "..." }. The status code tells you which
call failed.
POST /tokenapiKey or apiSecret missing/empty, or the key isn't recognised.apiSecret doesn't match the key.{
"message": "API secret and key invalid"
}401/403 triggers one re-auth + retry before surfacing the error.