OAuth2 Token
Exchanges a grant for an access token: client_credentials (your app's own token), authorization_code with PKCE (a user who connected your app), or refresh_token. Send the parameters form-encoded. Errors use the RFC 6749 shape, {"error", "error_description"}.
/oauth/tokenExchanges a grant for an access token: client_credentials (your app's own token), authorization_code with PKCE (a user who connected your app), or refresh_token. Send the parameters form-encoded. Errors use the RFC 6749 shape, {"error", "error_description"}.
application/x-www-form-urlencoded- body
client_id*stringclient_secret?stringcode?stringFor authorization_code
code_verifier?stringPKCE, for authorization_code
grant_type*stringauthorization_code, client_credentials, refresh_token
redirect_uri?stringFor authorization_code
refresh_token?stringFor refresh_token
scope?array<string>Space-delimited when form-encoded
OK
application/json- response
access_token?stringexpires_in?integerSeconds until the access token expires.
refresh_token?stringIssued for authorization_code and refresh_token grants, never for client_credentials.
scope?stringSpace-separated.
token_type?stringcurl -X POST "https://example.com/oauth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'client_id=string&grant_type=string'{ "access_token": "string", "expires_in": 3600, "refresh_token": "string", "scope": "payments:create payments:read", "token_type": "Bearer"}