Authentication

Our API uses access tokens to authenticate clients.

Each bot is associated to an access token.
You can find your token on your bot settings page.

❗️

Do not share your access tokens

Access tokens give access to important functions of your bot, you should keep them secret.

Usage

In order to use your access token, you need to provide it in the Authorization header when you make an HTTP request.

Make sure to use the Bearer type for your token in the header.

Example (replace ACCESS_TOKEN with your own token) :

curl -H 'Authorization: Bearer ACCESS_TOKEN' \
 https://api.clustaar.io/....

Interlocutor Authentication

When creating an interlocutor via Create an interlocutor, the field socketToken is a security token used primarily to secure the conversation an interlocutor has with the bot.
This token can also be used to authenticated some API calls Get interlocutor actions.
To build a Bearer token, encode the following json in base64. Use the interlocutor socketToken as the value field, and the interlocutor_id as id field

{
 "value":"socketTokenvalue",
 "subject":{"id": "interlocutor_id", 
            "type": "interlocutor"}
 }