Create Access Token from Auth Code

POST {{base_url}}/security/v1/oauth/token

This HTTP POST request allows users to provide an OAuth Authorization Code in the code field in order to obtain an access_token on behalf of a logged-in user. The response also contains a refresh_token that can be used in the Refresh Token operation.

Request Body

[{"name"=>"grant_type", "value"=>"authorization_code", "datatype"=>"string"}, {"name"=>"code", "value"=>"string", "datatype"=>"string"}, {"name"=>"redirect_uri", "value"=>"https://www.ups.com", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
x-merchant-idstringClient merchant ID
Content-Typestring

RESPONSES

status: OK

{"refresh_token_expires_in":"5183999","refresh_token_status":"approved","token_type":"Bearer","issued_at":"1706710138962","client_id":"client_id","access_token":"access_token","refresh_token":"refresh_token","refresh_token_issued_at":"1706710138962","expires_in":"14399","status":"approved"}