Get an Access Token

Last updated: August 6, 2025

To interact securely with Clazar’s APIs, your application must authenticate using an access token. This token is a time-bound credential that validates each API request you make.


Prerequisites

Before retrieving an access token, ensure you’ve completed the following:

  • Created API credentials by following the Create API Credentials guide.

  • Have your Client ID and Client Secret ready for authentication.


Steps to Retrieve an Access Token

To generate an access token, make a POST request to Clazar’s Authentication API using your client credentials.

Endpoint

https://api.clazar.io/authenticate/

Request Format

Send a POST request with the following payload:

Shell (cURL)

curl -X POST "https://api.clazar.io/authenticate/" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "<your_client_id>",
    "client_secret": "<your_client_secret>"
  }'

🔁 Replace <your_client_id> and <your_client_secret> with your actual credentials.


API Response

If the request is successful, you'll receive a response similar to this:

{
  "access_token": "access_token",
  "token_type": "bearer",
  "expires_in": 86400
}
  • access_token: The token to be used for authentication

  • token_type: The authorization scheme (always bearer)

  • expires_in: Token validity in seconds (e.g., 86,400 = 24 hours)

Tip: Store this token securely for use in subsequent requests.


Using the Access Token

To authorize future API calls, include the token in the request header:

Header Format

Authorization: Bearer <access_token>

🔁 Replace <access_token> with the token you received in the authentication response.