Authentication
The Client API uses a header-based access token. There is no JWT or session.
Access Token
| Header | x-access-token |
|---|---|
| When | Required on all protected endpoints |
| Error | 401 Unauthorized — missing or invalid token |
The token is tied to a company. Chat access is restricted to that company.
Create the token in the admin panel: Create Access Token.
Example header
x-access-token: <company-access-token>
const headers = {
'Content-Type': 'application/json',
'x-access-token': ACCESS_TOKEN,
};
Failed authentication
| Case | Typical result |
|---|---|
| Missing token | 401 — "Token is required" |
| Invalid token | 401 Unauthorized |