Pcornel
Browse topics
Options
Recent
Favorites
Identity · Technical reference

Access Token

Direct answer

An access token is a short-lived credential an application presents to an API to prove authorization, such as an OAuth 2.0 bearer token, often a JWT with scopes and an expiry.

When to use this

Use this when an application presents a token to an API to prove authorization.

First 30 seconds

1. Access tokens authorise API calls.

2. Audience-restricted to the API.

3. Scopes limit actions.

4. Short-lived; refresh for longer sessions.

5. Never use ID tokens as access tokens.

Operational verification

client → access token → API validates aud/scope/exp

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • APIs accepting tokens issued for other APIs (missing aud check).
  • Ignoring scopes/roles, so any valid token gets full access.
  • Long-lived access tokens that cannot be revoked.
  • Logging full tokens in reverse proxies or application logs.
Platform / version applicability
Identity, authentication and access control
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformIdentity, authentication and access control
Scope / prerequisiteUse this when an application presents a token to an API to prove authorization.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary
# Call the API with the token and look at the status and WWW-Authenticate header
curl -s -o /dev/null -D - -H "Authorization: Bearer $ACCESS_TOKEN" https://api.example.com/v1/orders | grep -iE '^HTTP|www-authenticate'

# Opaque token: ask the authorization server (introspection, RFC 7662; client authentication required)
curl -s -u "$CLIENT_ID:$CLIENT_SECRET" -d "token=$ACCESS_TOKEN" https://auth.example.com/oauth2/introspect | jq '{active, scope, aud, exp, sub}'

For JWT access tokens, decode the payload (see Tokens) and compare aud, scp/roles and exp with what the API expects.

Step 2 Failure boundaries Narrow the fault
  • Authorization server: token never issued or wrong scopes (consent, role assignment, client configuration).
  • Client: wrong scope requested, token for another audience, token not refreshed.
  • Network/proxy: Authorization header stripped by a proxy or lost on redirect.
  • API: wrong expected audience/issuer, stale JWKS, clock skew, scope mapping errors.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Access tokens are short-lived bearer credentials.
  • Validate issuer, audience, signature and expiry.
  • Scopes limit what the token allows.
Key checks
  • API token validation middleware — signature, aud, exp, scope
  • curl -H 'Authorization: Bearer <token>' <api> — test call
  • Access token lifetime — minutes, not days
ReferenceWhat it is1 section · depth on demand

Direct Answer

An access token authorises a client to call one API. It is sent as Authorization: Bearer <token>, and the API must check signature (or introspection), issuer, audience, expiry and scopes/roles on every request. 401 means the token itself was rejected; 403 with insufficient_scope means it is valid but not allowed to do this.

ReferenceWhy it matters1 section · depth on demand

Handling access tokens

  • Short lifetime (5–60 minutes); the API checks signature, issuer, audience, expiry and scopes on every request.
  • Sent as Authorization: Bearer <token>; anyone holding it can use it, so only over TLS and never in URLs or logs.
  • Opaque tokens are checked by introspection; JWT tokens are validated locally.
  • Use sender-constrained tokens (DPoP, mTLS) for high-value APIs.
ReferenceImportant terms & boundaries2 sections · depth on demand

Token formats

FormatValidation
JWT (self-contained)Verify signature, iss, aud, exp, scopes locally
Opaque (reference)Call the introspection endpoint

Keep access tokens short-lived (5–60 minutes). Never send them in URLs; use the Authorization: Bearer header.

In depth

An access token lets a client call an API — on behalf of a user (delegated) or as itself (application-only). The API, called the resource server, must check it on every request.

How it is sent (RFC 6750)

Authorization: Bearer <token> over TLS. Tokens in URL query strings end up in logs and should not be used.

What the API must check

CheckWhy
Signature (JWT) or introspection active: true (opaque)Token is genuine and not revoked
issIssued by the trusted authorization server
audIssued for this API — prevents a token for API A being replayed at API B
exp / nbfCurrently valid
Scopes (scp/scope) or rolesThe specific operation is permitted
Token typeNot an ID token presented as an access token (RFC 9068 uses typ: at+jwt)

Delegated vs application permissions

Delegated tokens carry the user's identity plus scopes the client was consented to; the API should also apply the user's own permissions. Application-only tokens (client credentials grant) carry roles granted to the client itself and no user — common for daemons and automation.

Lifetime

Keep access tokens short-lived (minutes to about an hour). Self-contained JWTs cannot be revoked before expiry; opaque tokens checked through introspection (RFC 7662) can. For high-value APIs, use sender-constrained tokens (mTLS or DPoP) so stolen tokens cannot be replayed.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Lifecycle and ownership

  • Authorization server sets lifetime, format and signing keys, and the API's identifier (audience) and scopes.
  • API owner defines scopes/roles, validates tokens and maps them to permissions.
  • Client owner requests only needed scopes, stores tokens in memory or secure storage, and renews through the refresh flow.
  • Rotation: signing keys rotate at the authorization server; APIs must load keys from JWKS, not hard-code them.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docIdentity, authentication and access control current

Authoritative/upstream documentation reviewed for bounded claims in Single Sign-On & Federation → Access Token. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc7522 · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
access tokenbearer token
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

ResponseMeaning
401 + WWW-Authenticate: Bearer error="invalid_token"Expired, wrong signature, wrong issuer or audience, or revoked
401 without errorNo token sent, or wrong scheme
403 + error="insufficient_scope"Token valid but lacks the required scope/role
400 + error="invalid_request"Malformed request, e.g. token sent twice or in a disallowed place
Introspection active: falseToken expired, revoked or unknown to this server
Confirmation

Confirm action

Continue?