Skip to main content
POST
https://{yourDomain}
/
oauth
/
token
Token Endpoint
curl --request POST \
  --url https://{yourDomain}/oauth/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=authorization_code \
  --data 'code=<string>' \
  --data 'client_id=<string>' \
  --data 'redirect_uri=<string>' \
  --data 'client_secret=<string>' \
  --data 'audience=<string>' \
  --data 'client_assertion=<string>' \
  --data client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEyMzQ1In0...",
  "refresh_token": "v1.MRHbz1VqR_y42v...",
  "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 86400,
  "scope": "openid profile email offline_access"
}

Documentation Index

Fetch the complete documentation index at: https://docs-staging.auth0-mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

DPoP
string

A DPoP proof JWT for enhanced security. Required only if your application uses Demonstrating Proof-of-Possession (DPoP).

Body

Authorization Code Grant - Exchange an authorization code for tokens. Used by server-side web applications that can securely store a client secret.

grant_type
enum<string>
required

Must be 'authorization_code'

Available options:
authorization_code
code
string
required

The authorization code received from the authorization endpoint

client_id
string
required

Your application's Client ID

redirect_uri
string<uri>
required

The same redirect_uri used in the authorization request. Must match exactly.

client_secret
string

Your application's Client Secret. Required for confidential clients.

audience
string

The unique identifier of the target API you want to access

client_assertion
string

A JWT signed with your client secret or private key (for Private Key JWT authentication)

client_assertion_type
enum<string>

Must be 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer' when using client_assertion

Available options:
urn:ietf:params:oauth:client-assertion-type:jwt-bearer

Response

Successful token exchange. Returns access token and optionally ID token and refresh token.

Successful token response containing access token and optionally ID token and refresh token

access_token
string
required

The access token issued by the authorization server. Use this token to access protected resources (APIs).

Example:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEyMzQ1In0..."

token_type
enum<string>
required

The type of the token issued. Always 'Bearer' for Auth0.

Available options:
Bearer
Example:

"Bearer"

expires_in
integer
required

The lifetime in seconds of the access token. After this time, the token will expire and can no longer be used.

Example:

86400

refresh_token
string

The refresh token which can be used to obtain new access tokens. Only returned if 'offline_access' scope was requested.

Example:

"v1.MRHbz1VqR_y42v..."

id_token
string

The ID Token containing user profile information. Only returned if 'openid' scope was requested. This is a JWT containing user claims.

Example:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."

scope
string

The scopes granted by the authorization server. May differ from requested scopes.

Example:

"openid profile email"