Authorization header alongside an application-level Api-Key header.
Obtaining a Token
Authenticate by posting credentials to the login endpoint. The Auth service returns both anaccessToken (short-lived) and a refreshToken (long-lived).
Using the Token in Requests
Include the access token as a Bearer credential in theAuthorization header of every request:
.), hyphens (-), and underscores (_). Any other characters indicate token corruption and the request is rejected.
Refreshing a Token
Access tokens expire. When a request returns401 Unauthorized, use the refresh token to obtain a new access token without re-entering credentials.
Token Refresh Flow
- Make an API request with the current access token.
- If the response is
401and you have a refresh token, call the refresh endpoint. - On success, update stored tokens and retry the original request.
- If the refresh also fails with
401, the session has expired — redirect the user to log in again.
Handling 401 Responses
The platform’s axios interceptors implement this flow automatically for browser clients. If you are building a custom integration:- Retry a
401exactly once per request using the refresh token (track with an_retryflag). - If the refresh fails, clear stored tokens and require re-authentication.
- Never retry more than once — this prevents infinite loops on genuinely expired sessions.
Revoking a Token (Logout)
Revoke the access token when a user logs out:200 response confirms the token is revoked. If you receive 401, the token was already expired. In either case, clear the locally stored tokens.
API Key Authentication
TheApi-Key header is required on every request in addition to the Bearer token. It identifies the client application:
REACT_APP_AUTH_API_KEY environment variable.
The
Api-Key identifies your application; the Authorization: Bearer token identifies the user. Both are required on all requests.Checking Token Info
Verify that an access token is valid and inspect its claims:200 response confirms the token is valid. A 401 means it is expired or invalid.