Token Response

Reference for OAuth 2.0 token endpoint responses.

Successful Response

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
  "access_token": "eyJhbGciOiJSUzI1NiIs...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "dGhpcyBpcyBhIHJlZnJlc2g...",
  "scope": "openid profile email",
  "id_token": "eyJhbGciOiJSUzI1NiIs..."
}

Response Fields

Field
Type
Description

access_token

String

The access token

token_type

String

Always Bearer

expires_in

Integer

Token lifetime in seconds

refresh_token

String

Token for renewal (optional)

scope

String

Granted scopes (space-separated)

id_token

String

OIDC ID token (when openid scope)

Access Token Format

Authority issues JWTs as access tokens:

Decoded JWT

Header:

Payload:

JWT Claims

Claim
Description

iss

Issuer (Authority URL)

sub

Subject (user ID)

aud

Audience (client ID)

exp

Expiration time

iat

Issued at time

scope

Granted scopes

client_id

Client identifier

Token Types by Grant

Authorization Code

Client Credentials

No refresh token or ID token for client credentials.

Refresh Token

New refresh token issued (rotation).

Bearer Token Usage

Use the access token in API requests:

circle-exclamation

Error Response

See Error Codes for all error types.

Token Validation

JWT Validation Steps

  1. Parse the JWT

  2. Verify signature using JWKS

  3. Check issuer matches Authority URL

  4. Check audience matches your client ID

  5. Check expiration is in the future

  6. Check scope includes required permissions

Example Validation

Token Introspection

For opaque tokens or real-time validation:

Response:

Caching

HTTP headers prevent caching:

Never cache token responses.

Next Steps

Last updated

Was this helpful?