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:JOIN_ROOM message, which performs both authentication and room join in a single step. If the token is invalid or expired, the 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