Skip to content

Authentication - API

Obtain an access token

Make a POST request to https://api.autopass.pro/oauth and provide the following JSON body :

json
{
    "grant_type": "client_credentials",
    "client_id": "<client_id>",
    "client_secret": "<client_secret>"
}

Where <client_id> and <client_secret> should be replaced by you own ID and secret, respectively.

In return, the response body will look like this:

json
{
    "access_token": "470d9f3c6b0371ff2a88d0c554cbee9cad495e8d",
    "expires_in": 604800,
}

Where expires_in is the life duration of the token, in seconds.

By default, each access token expires after one week.

If needed, we could manage a unique-token strategy by generating and providing you a unique access token that will expire at the end of your contract.

Use an access token

Your request must include one of the following:

  • X-Access-Token header field

    The access token must be passed directly as the header value.

  • access_token query parameter

    The access token must be passed directly as the parameter value.