Exchange an authorization code or client credentials for a bearer access token.
- Use
grant_type=authorization_codealong with thecodeandredirect_urifrom the Authorization Code flow. - Use
grant_type=client_credentialsfor the Client Credentials flow (no user redirect required).
Body
Required
-
Values are
authorization_codeorclient_credentials. -
Client ID provided by Lonewolf
-
Client Secret provided by Lonewolf
-
Authorization code from step 3 (authorization_code flow only). One-time use, expires in 10 minutes.
-
Must match the redirect_uri used in step 1 (authorization_code flow only)
POST
/oauth/token
curl \
--request POST 'https://api.pre.transactiondesk.com/oauth/token' \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'grant_type=authorization_code&client_id=Lonewolf&client_secret=LonewolfSecret&code=a29fc587-96f3-4fa2-a4ad-c42fef5141f7&redirect_uri=https%3A%2F%2Fwww.example.com'
Response examples (200)
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "bearer"
}