DevelopersAPI ReferenceO Auth
Exchange A Token
Exchanges an authorization code (with its code_verifier) or a refresh token for an access token. Access tokens last an hour; refresh tokens ninety days.
Request Body
application/x-www-form-urlencoded
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/oauth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'grant_type=authorization_code&client_id=string'{ "access_token": "string", "token_type": "string", "expires_in": 0, "refresh_token": "string", "scope": "string"}