Endpoint
POST /oauth/token
This is the OAuth 2.0 grant that server processes use to access an API. Use this endpoint to directly request an access token by using the application’s credentials (a Client ID and a Client Secret).
Responses
200
A successful response will return an access token.Learn More
- Client Credentials Flow
- Call API using the Client Credentials Flow
- Setting up a Client Grant using the Management Dashboard
- Asking for Access Tokens for a Client Credentials Grant
Headers
string
A DPoP proof for the request. This is optional and only required if your application uses Demonstrating Proof-of-Possession.
Body Parameters
The request body is in
application/x-www-form-urlencoded format.string
required
Denotes the flow you are using. For Client Credentials use
client_credentials.Allowed values: client_credentialsstring
required
Your application’s Client ID.
string
required
Your application’s Client Secret.
string
required
The unique identifier of the target API you want to access.
string
The identifier of the target API (resource server) you want to access. Must match an API Identifier registered in your Auth0 tenant. Used as an alternative to
audience when the tenant’s Resource Parameter Compatibility Profile is set to compatibility.string
[Recommended]The organization or identifier with which you want the request to be associated. To learn more, read Machine-to-Machine Access for Organizations.
Response Schema
Agent access tokens
Agents as principals is an Early Access feature.
- The
subclaim is the agent identifier (for example,agt_72jbvv7LfRKYp59gtRLtkn) instead of the application Client ID. - The token includes
sub_profile: "ai_agent"andclient_profile: "service ai_agent".
sub claim is the application Client ID without the @clients suffix. The response shape (access_token, token_type, expires_in) is unchanged; these are claims inside the issued JWT. To learn more, read Access Token Profiles.