Skip to main content

OAuth2 Bearer Token Authentication

The APIs require an OAuth2 access token. Follow the steps below to obtain a token and use it in your requests.

Prerequisites

Contact your account manager to obtain:
  • Client ID (clientId)
  • Client Secret (clientSecret)

Step 1: Generate an OAuth2 Access Token

Make a POST request to the OAuth2 token endpoint. Endpoint:
HTTP Headers: Create the Authorization Header: Combine your clientId and clientSecret with a colon separator and encode in Base64:
Example result: Y2xpZW50SWQ6Y2xpZW50U2VjcmV0 Request Body:
Example Request:
Response:

Step 2: Use the Access Token

Standard Bearer Token

Include the access token in the Authorization header using the Bearer scheme. Example Request:
Required Headers:

Token Management Best Practices

  • Token Expiration: OAuth tokens have a limited lifetime. Implement token refresh logic in your application.
  • Secure Storage: Store client credentials and tokens securely using environment variables or secret management systems.
  • Error Handling: Implement proper error handling for authentication failures and token expiration scenarios.
  • Token Reuse: Cache and reuse valid tokens across multiple requests to minimize authentication overhead.