OAuth 2.0 Token Endpoint
/oauth/tokenToken endpoint (RFC 6749 section 3.2). Exchanges an authorization code for access and refresh tokens (authorization_code grant), or exchanges a refresh token for new tokens (refresh_token grant).
Sample request12curl --request POST 'https://api.eu-west-1.aws.dash0.com/oauth/token' \--data-urlencode 'grant_type=authorization_code'
Request body required
authorization_code: The standard authorization code grant (RFC 6749 section 4.1).refresh_token: Exchange a refresh token for new tokens (RFC 6749 section 6).
"authorization_code""refresh_token"The authorization code (required for authorization_code grant).
Must match the redirect_uri used in the authorization request (required for authorization_code grant).
The client identifier.
PKCE code verifier (required for authorization_code grant). All public clients must use PKCE (RFC 7636).
The refresh token (required for refresh_token grant).
Space-separated list of requested scopes. For refresh_token grant, must be equal to or a subset of the originally granted scopes.
Responses
Tokens issued successfully.
The access token issued by the authorization server.
The type of token issued (always "Bearer").
Lifetime of the access token in seconds.
The refresh token for obtaining new access tokens.
Space-separated list of granted scopes.
"restricted""unrestricted"