| Mechanism | Used For | Format |
|---|---|---|
| Bearer Token | All REST API calls (rooms, users, storage, webhooks, workflows) | Authorization: Bearer <base64(accountId:apiKey)> |
| JWT Token | Client SDK WebSocket connections | Passed to the Client SDK manullay |
Bearer Authentication
All REST API endpoints require Bearer authentication.Constructing the Token
The Bearer token is a Base64-encoded string combining youraccountId and apiKey:
- Bash
- Javascript
Using the Token
Include it in theAuthorization header:
- Bash
- Javascript
JWT Authentication (Client SDK)
The client SDK authenticates over WebSocket using a JWT token. You get this token when you create a user via the REST API.Getting a JWT
- Bash
- Javascript
token field containing the JWT:
Using the JWT
Pass the JWT when constructing the client:authFailed socket event fires:
Token Lifecycle
- Tokens are valid for 90 days from creation
- Each call to
POST /usersgenerates a new token for that user - Each call to
POST /userscreates a new user with a server-generated UUID - There is no refresh endpoint — create a new user entry to get a new token
Error Responses
Authentication failures return a standard error response:| HTTP Status | Cause |
|---|---|
401 | Missing, malformed, or invalid Bearer token / session cookie |
403 | Valid credentials but insufficient permissions |