POST /oauth/token

This endpoint allows you to exchange client credentials for a Bearer access token, required when authenticating API requests made to Deliverect.

application/json

Body

  • client_id string Required
  • client_secret string Required
  • audience string Required
  • grant_type string Required

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Accept string
    • Content-Type string
  • 401 application/json

    Unauthorized

    Hide headers attributes Show headers attributes
    • Date string
    • Content-Type string
    • Content-Length integer
    • Connection string
    • X-Auth0-RequestId string
    • X-RateLimit-Limit integer
    • X-RateLimit-Remaining integer
    • X-RateLimit-Reset integer
    • WWW-Authenticate string
    • Cache-Control string
POST /oauth/token
curl \
 --request POST 'https://api.staging.deliverect.com/oauth/token' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"client_id":"{{clientId}}","client_secret":"{{clientSecret}}","audience":"https://api.deliverect.com","grant_type":"client_credentials"}'
Request examples
{
  "client_id": "{{clientId}}",
  "client_secret": "{{clientSecret}}",
  "audience": "https://api.deliverect.com",
  "grant_type": "client_credentials"
}
Response examples (200)
{
  "access_token": "ey**-**-Q",
  "expires_at": 1620899002,
  "token_type": "Bearer",
  "scope": "genericPOS provisioning"
}
Response examples (401)
{
  "error": "access_denied",
  "error_description": "Unauthorized"
}