Passer au contenu principal
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.

Autorisations

Authorization
string
header
requis

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

En-têtes

DPoP
string

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

Corps

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>
requis

Must be 'authorization_code'

Options disponibles:
authorization_code
code
string
requis

The authorization code received from the authorization endpoint

client_id
string
requis

Your application's Client ID

redirect_uri
string<uri>
requis

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

Options disponibles:
urn:ietf:params:oauth:client-assertion-type:jwt-bearer

Réponse

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
requis

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

Exemple:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEyMzQ1In0..."

token_type
enum<string>
requis

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

Options disponibles:
Bearer
Exemple:

"Bearer"

expires_in
integer
requis

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

Exemple:

86400

refresh_token
string

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

Exemple:

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

Exemple:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."

scope
string

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

Exemple:

"openid profile email"