Errors
Every error has a stable code. Match on the code, show the message to people.
Errors come back with an HTTP status and this body:
{
"error": {
"code": "limit_pending_streams",
"message": "At most 2 streams may be waiting to go live at once. Start or delete one first.",
"details": { "limit": 2, "current": 2 },
"request_id": "req_8k2m0q4b7c1d8e3a9f5x"
}
}code never changes for a given condition, so program against it. message is written for people and may change. details appears when there are numbers worth having. request_id is also in the X-Request-Id header of every response: quote it when you write to us.
When waiting fixes the error, the response has a Retry-After header in seconds: rate_limited, limit_creation_rate, chat_slow_mode, chat_rate_limited, chat_busy and no_capacity. The other limits don't go away by waiting and have none.
Codes
| Status | code | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_request | A field is missing, unknown or out of range. The message names it. | Fix the request. |
| 400 | invalid_nickname | A chat nickname that isn't 2–24 characters, or contains a link. | Show the message to the viewer. |
| 401 | moderator_unauthorized | No valid moderator session for this stream: the moderator was removed, or their active_days ran out. | Ask the owner for a new moderator link. |
| 401 | invalid_session | A missing, forged or expired viewer session on a public chat call. | Get a new one: POST /v1/embed/{id}/session. |
| 401 | invalid_viewer_token | The viewer token was refused. The message says why: signature, expiry, unknown or deleted key, another stream. | Fix what the message names; sign a fresh token for each page load. |
| 401 | viewer_token_required | A members-only stream (player.require_viewer_token), and the session request had no viewer token. | Open the stream from your site with a viewer token. |
| 401 | unauthorized | Missing or wrong API key. | Send Authorization: Bearer joa_live_…. |
| 402 | insufficient_credit | Less than $1.00 of credit left. details has the balance. | Add credit. |
| 403 | account_pending | The account hasn't been approved yet. | Wait for the approval email. |
| 403 | viewer_removed | A members-only stream: you removed this viewer (a ban by viewer_id). | Nothing to do for the viewer; unban them to let them back. |
| 403 | viewer_access_ended | A members-only stream: the viewer token's exp passed. | Sign a new token: the viewer reopens the page from your site. |
| 403 | origin_not_allowed | A chat session, post or reaction from a browser on a site not in player.allowed_domains. | Add the site, or call from an allowed one. |
| 403 | tenant_suspended | The account is suspended. | Contact JustOnAir. |
| 404 | not_found | No such stream in this account, or no such endpoint. | Check the id, the path and the key's account. |
| 409 | stream_not_pending | The key can only be replaced before the stream goes live. details.status says the current status. | For an expired stream, create a new one. |
| 409 | stream_ended | The stream has ended, so no new playback links. | Use the recording, or turn on replay. |
| 409 | invite_invalid | A moderator link that was already used, revoked, expired, or is for another stream. | Ask the owner for a new link. |
| 409 | chat_not_enabled | A chat action on a stream that never had chat on. | Set chat.enabled on the stream. |
| 409 | chat_closed | Chat isn't open (details.state). | See Chat and reactions. |
| 409 | chat_paused | The owner paused chat; viewers can't post. | Show "chat is paused". |
| 409 | recording_not_ready | The MP4 isn't ready. details.status says why. | Poll the stream until recording.status is ready. |
| 422 | chat_message_not_allowed | A viewer's chat message contains a link. | Show "links are not allowed". |
| 422 | idempotency_key_reused | This Idempotency-Key was already used with a different body. | Use a new key for a different request. |
| 429 | limit_pending_streams | Too many streams waiting to go live. | Start or delete one first. |
| 429 | limit_creation_rate | Too many streams created in the last hour. | Wait Retry-After (also details.retry_after_seconds); reuse pending streams. |
| 429 | limit_ingest_hours | Monthly ingest hours used up (new accounts: 20). | Wait for next month or ask to be trusted. |
| 429 | limit_resolution | max_resolution above what the account may send (new accounts: 720). | Ask to be trusted for 1080p. |
| 429 | limit_channels | The account has as many channels as it may (new accounts: 3). | Delete one, or ask to be trusted. |
| 429 | limit_api_keys | 20 active API keys already. | Revoke one in the dashboard. |
| 429 | limit_moderators | 50 moderators on this stream or moderation group already. | Remove one first. |
| 429 | limit_viewer_keys | 10 viewer keys on the account already. | Delete one you no longer use (dashboard: API keys → Viewer keys). |
| 429 | limit_webhook_endpoints | 5 webhook endpoints already. | Delete one, or subscribe one endpoint to more events. |
| 429 | chat_slow_mode | A viewer posted again too soon. details.retry_after_seconds. | Show a countdown. |
| 429 | chat_rate_limited | 30 chat messages a minute from one address on one stream. | Wait details.retry_after_seconds. |
| 429 | chat_busy | The stream's chat is at its hard limit. | Retry after details.retry_after_seconds. |
| 429 | rate_limited | Too many requests to the public embed or chat endpoints (unknown ids, or a flood from one address). | Slow down; wait Retry-After. |
| 4xx | http_error | A request the API couldn't take at all, such as a body that isn't JSON. The status says which. | Fix the request. |
| 500 | internal_error | A problem on our side. | Retry with backoff. If it keeps happening, write to us with the request_id. |
| 503 | no_capacity | No ingest capacity free right now. | Retry after Retry-After (a minute). |
Retrying a create with the same Idempotency-Key is always safe; see API basics.
Refusals that aren't HTTP errors
Some problems happen on the video connection, not on an API call. A publisher can be refused (wrong key, stream already finished, another publisher connected, account out of credit), or a live stream can be ended. The API call to read the stream then shows why: status and end_reason on Stream lifecycle.