Token Endpoint
To start a voice session, send a POST request with your API key to receive a session token and WebSocket URL.Response
On success, the server returns a JSON object with two fields:| Field | Description |
|---|---|
token | Short-lived JWT valid for 5 minutes. Used to authenticate the WebSocket connection. |
ws_url | The WebSocket endpoint URL to connect to. |
Error Responses
| Status | Description |
|---|---|
| 401 Unauthorized | Invalid or missing API key. Check your Authorization header. |
| 403 Forbidden | API key is valid but the kiosk is inactive or disabled. |
| 500 Internal Error | Server-side issue. Retry after a short delay. |
Best Practices
- Request a fresh token for each voice session — do not cache or reuse tokens
- Use the token immediately after receiving it — it expires in 5 minutes
- If the WebSocket connection fails, request a new token before reconnecting
- Handle authentication errors gracefully and provide user feedback