curl --request POST \
--url https://api.example.com/api/v1/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'grant_type=<string>' \
--data 'client_id=<string>' \
--data 'client_secret=<string>' \
--data 'code=<string>' \
--data 'code_verifier=<string>' \
--data 'redirect_uri=<string>' \
--data 'refresh_token=<string>'{
"access_token": "<string>",
"expires_in": 123,
"token_type": "<string>",
"refresh_token": "<string>",
"scope": "<string>"
}OAuth 2.0 token endpoint. Supports two grant types:
authorization_code: Exchange an authorization code for tokensrefresh_token: Refresh an access tokenAuthenticate via HTTP Basic auth (client_id:client_secret) or body parameters.
curl --request POST \
--url https://api.example.com/api/v1/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'grant_type=<string>' \
--data 'client_id=<string>' \
--data 'client_secret=<string>' \
--data 'code=<string>' \
--data 'code_verifier=<string>' \
--data 'redirect_uri=<string>' \
--data 'refresh_token=<string>'{
"access_token": "<string>",
"expires_in": 123,
"token_type": "<string>",
"refresh_token": "<string>",
"scope": "<string>"
}Token request (from POST body, application/x-www-form-urlencoded)
Grant type: "authorization_code" or "refresh_token"
Client ID (if not using HTTP Basic auth)
Client secret (if not using HTTP Basic auth)
Authorization code (for authorization_code grant)
PKCE code verifier (for authorization_code grant with PKCE)
Redirect URI (for authorization_code grant, must match the one used in /authorize)
Refresh token (for refresh_token grant)