Tokens — Access

Tokens

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.

Obtaining & Using

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.

Claims

Claim Description
subThe ID of the account.
client_idThe ID of the application the token is issued to.
audThe audiences of the token, i.e. the APIs it can be used for.
scopeThe granted scopes, space-separated (or as returned by the access token extension).
issThe issuer, i.e. your tenant: https://{tenant_id}.api.quasr.io.
iat / nbf / expWhen the token was issued, is valid from and expires.
jtiThe 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/typThe token type: oauth2:access.
https://api.quasr.io/claims/maxThe latest moment the token can expire, from the consent (e.g. a temporary consent).
https://api.quasr.io/claims/useHow often the token can be used: 0 (unlimited).
https://api.quasr.io/claims/ipbWhether the token is bound to the IP address in ipa.
https://api.quasr.io/claims/ipaThe IP address the token was issued to.
https://api.quasr.io/claims/tenThe ID of the tenant.

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}"}

Configuration

Access tokens are configured per application (see Applications — Configuration):

  • Expiration (config.tokens.access.exp) - 1 day by default, at most 30 days.
  • Audiences (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.
  • Extension (config.tokens.access.ext) - An extension that adds custom claims or changes the scopes.
  • Encryption (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.
  • IP Binding (config.tokens.access.ipb) - Whether the token can only be used from the IP address it was issued to. Disabled by default.
  1. 11 day by default, at most 30 days
  2. 2Keep https://api.quasr.io to use the token with the Management API
  3. 3Off by default: on, the token stops working when the user switches networks

Claims from attributes are added by the controls the user passes (Access Attributes).

Security

  • Keep access tokens short-lived for applications with sensitive scopes, and use a refresh token to obtain new ones.
  • Access tokens of 1 hour or more (such as the default of 1 day) are tracked and can be revoked, e.g. with POST oauth2/revoke. Called with the access token itself as bearer token, this endpoint revokes that token, e.g. on logout. See Revocation.
  • APIs that validate access tokens locally only notice a revocation when they use introspection.
2026.11.22 | © Copyright 2026 Quasr BV