Exchange Code for Tokens
Server-to-server call. Exchange the authorization code for an access_token. Use the access_token as a Bearer token in the Authorization header when calling API endpoints.
POST
/api/oauth/tokenAuthentication
OAuth
Authorization: BearerUses client_id + client_secret in the request body (not headers).
Query Parameters
grant_typestringMust be 'authorization_code'
Default:
authorization_codecodestringThe authorization code from the callback redirect
client_idstringFrom Partner Account → Manage Apps → View Credentials
client_secretstringFrom Partner Account → Manage Apps → View Credentials
redirect_uristringMust match the URI used in the authorize step
Responses
200Success
application/jsonaccess_tokenstringtoken_typestringscopestring