The access token authorizes the application to call APIs on behalf of the user (or on its own behalf, for machine applications), as defined by OAuth 2.0. It's issued by the token endpoint of the Authentication API for every successful grant, and contains the account, the application and the granted scopes. See Tokens — General for how it fits in the lifecycle.
The token endpoint returns the access token, with its lifetime in seconds (expires_in) and expiry (expires_at), and optionally a refresh token and identity token:
{ "token_type": "Bearer", "access_token": "{access_token}", "expires_in": 86400, "expires_at": 1767312000, "refresh_token": "{refresh_token}", "id_token": "{identity_token}"}The application passes the access token as bearer token to your API, or to the Quasr Management API (if its audience includes https://api.quasr.io) or Agent API (if its audience includes https://api.quasr.io or https://{tenant_id}.api.quasr.io/mcp):
GET /orders HTTP/1.1Host: api.example.comAuthorization: Bearer {access_token}Your API validates the token, see Validation. To also detect revoked tokens, call the introspection endpoint (POST oauth2/introspect) with an access token that has the https://api.quasr.io/scopes/oauth2/introspect scope.
| Claim | Description |
|---|---|
sub | The ID of the account. |
client_id | The ID of the application the token is issued to. |
aud | The audiences of the token, i.e. the APIs it can be used for. |
scope | The granted scopes, space-separated (or as returned by the access token extension). |
iss | The issuer, i.e. your tenant: https://{tenant_id}.api.quasr.io. |
iat / nbf / exp | When the token was issued, is valid from and expires. |
jti | The unique ID of the token. |
{attribute} | Custom claims from attributes (with {attribute}_verified for attributes that require validation) and from the access token extension. |
https://api.quasr.io/claims/typ | The token type: oauth2:access. |
https://api.quasr.io/claims/max | The latest moment the token can expire, from the consent (e.g. a temporary consent). |
https://api.quasr.io/claims/use | How often the token can be used: 0 (unlimited). |
https://api.quasr.io/claims/ipb | Whether the token is bound to the IP address in ipa. |
https://api.quasr.io/claims/ipa | The IP address the token was issued to. |
https://api.quasr.io/claims/ten | The ID of the tenant. |
scope, otherwise the token contains no scopes.An example access token, with the default Quasr audience and your own (back-end) audience:
{ "client_id": "{client_id}", "scope": "openid offline_access", "email": "jane@example.com", "email_verified": true, "sub": "{account_id}", "jti": "{token_id}", "aud": [ "https://api.quasr.io", "https://api.example.com" ], "iss": "https://{tenant_id}.api.quasr.io", "iat": 1767225600, "nbf": 1767225600, "exp": 1767312000, "https://api.quasr.io/claims/typ": "oauth2:access", "https://api.quasr.io/claims/max": 2082801600, "https://api.quasr.io/claims/use": 0, "https://api.quasr.io/claims/ipb": false, "https://api.quasr.io/claims/ipa": "203.0.113.42", "https://api.quasr.io/claims/ten": "{tenant_id}"}Access tokens are configured per application (see Applications — Configuration):
config.tokens.access.exp) - 1 day by default, at most 30 days.config.tokens.access.aud) - The APIs the token is meant for. Defaults to https://api.quasr.io; include it to use the token with the Management API. For an AI agent, set it to https://{tenant_id}.api.quasr.io/mcp only, so the token works on the Agent API and nowhere else in Quasr.config.tokens.access.ext) - An extension that adds custom claims or changes the scopes.config.tokens.access.jwk) - The URL of your back-end's key set, to encrypt the token so only your back-end can read it. Encrypted tokens can't be used with the Quasr APIs.config.tokens.access.ipb) - Whether the token can only be used from the IP address it was issued to. Disabled by default.Claims from attributes are added by the controls the user passes (Access Attributes).
POST oauth2/revoke. Called with the access token itself as bearer token, this endpoint revokes that token, e.g. on logout. See Revocation.