Authentication

All HTTP requests you send to Olos Analytics API must include a temporary access token in the Authorization header, in the form of Bearer <token>.

To obtain an access token you first send a POST request like this:

curl --request POST \
     --url https://auth.api-prod01.olos.live/token \
     --header 'tenant-id: <tenant ID>' \
     --header 'x-api-key: <API key>'

If you don't know the tenant ID and/or API key, please reach out to Olos at opd@olos.com.br

You will get back response like this:

{
    "token_type": "Bearer",
    "access_token": "JhbxHN...Fcg",
    "expires_at": 1762185789,
    "refresh_token": "eGdN...cA",
    "expires_at_refresh_token": 1762268589
}

You can then use the access token to authenticate your requests to the Olos Analytics API until it expires. Before it expires, you should request a new access token, but this time you can send the refresh token instead of your long-term credentials. You will get both a new access token and new refresh token with new expiration times.