How to obtain access token

To access the Credit Clear API, you need to obtain a bearer token that authenticates and authorizes your requests. You can get a bearer token by using your client_id and client_secret that are provided to you by Credit Clear during the onboarding process. You need to send these credentials to the Credit Clear auth server and request an access token.

Here is an example of how to generate an access token using cURL:

curl --request POST \
--url <CREDIT_CLEAR_AUTH_SERVER>/oauth/token \
--header 'content-type: application/json' \
--data '{"client_id": "<YOUR_CLIENT_ID>", "client_secret": "<YOUR_CLIENT_SECRET>", "audience": "<SYNC_API_AUDIENCE>", "grant_type": "client_credentials"}'

The response will contain an access_token that contains the bearer token as shown below:

{
    "access_token": "<ACCESS_TOKEN>",
    "token_type": "Bearer"
}

You need to include this token in the Authorization header of your requests to the Credit Clear API, using the format Bearer {access_token}. If you omit or provide an invalid token, your requests will be rejected by the Credit Clear API.

Access token lifetime

Lifetime of the bearer token is 24 hours. You do not need to get a new token per request, please use a single token for the next 24 hours. Once it is expired, you will need to obtain another bearer token.

🚧

Rate limit is on place

To avoid exceeding our rate limit, please limit the frequency of your token requests. Otherwise, your requests may be temporarily rejected to preserve our service quality.