Authentication

Creating a token

  1. Open Admin → Agents in the dashboard.
  2. Click Add agent and select the CHATBOT role.
  3. Copy the token from the confirmation dialog — it is displayed only once.
  4. To rotate a token later, open the agent's menu and choose Regenerate token.
Tokens are shown once
The plain-text token is never stored. BXLivechat keeps only the SHA-256 hash. If you lose the token you must regenerate it.

Using a token

Include the token in every request as a Bearer header:

Authorization header
Authorization: Bearer bxl_pat_aB7XyZ...

Token properties

ParameterTypeDescription
FormatstringPrefixed with bxl_pat_ followed by 32 random characters.
StoragehashOnly the SHA-256 hash is persisted. The plain-text token cannot be retrieved.
ScopeorganisationEach token is bound to a single organisation. It can only access that organisation’s data.
RevocationinstantDeleting or regenerating the token invalidates it immediately.
TrackingauditEvery API call made with the token is logged with the agent ID and timestamp.

Error response

If the token is missing or invalid the API returns:

401 Unauthorized
{
  "error": "Invalid or missing bot token",
  "code": "UNAUTHORIZED"
}