Skip to content
AnswerWell geo Documentation

Research · 8 min read · Answerwell

Meeting SDK Error Codes: Auth Token, Join Room, WebRTC Media, and Preset Permissions

How to read Cloudflare RealtimeKit client error codes, fix auth and network failures, and resolve preset and plugin permission issues.

This page summarises Cloudflare RealtimeKit documentation on error codes returned when a meeting client fails to initialise, join, send media, use chat, plugins, recording, or stage features. The same numeric codes apply to web and React Native clients. When something breaks, the SDK surfaces a code (for example 0004 or 0101) with a short message; matching that code to its module and fix is usually faster than guessing from UI text alone.

Error codes: how RealtimeKit groups failures

Section titled “Error codes: how RealtimeKit groups failures”

RealtimeKit error codes are four-digit strings tied to SDK modules. The first digits roughly indicate where the failure happened: client bootstrap and room lifecycle (0001–0004, plus meeting-level 1003–1006), controller and permissions (01xx), room node (02xx), sockets (04xx), chat (05xx / 40xx), plugins (06xx / 6000), recording (10xx / 7000), media and devices (11xx, 16xx, 21xx–23xx), participants (12xx), and stage (20xx / 8000). Many codes share the same fix pattern—especially Permission denied, Action not permitted without joining room, and Internal exception (retry, logs, support).

Error message: Unknown error
Possible reason: An unexpected error occurred that doesn’t fall into other categories.
Possible solution: Check the logs for more details and retry the operation. If you continue to experience issues, please reach out to Cloudflare support.

— Cloudflare, Error Codes (code 9900)

For the full per-code list, use the official Error Codes reference; the sections below cover the situations integrators and participants hit most often.

Failed to initialize and join room: client setup errors

Section titled “Failed to initialize and join room: client setup errors”

Error code 0001: RealtimeKitClient not initialised

Section titled “Error code 0001: RealtimeKitClient not initialised”

Failed to initialize means the client never completed RealtimeKitClient.init. Confirm you awaited initialization with a valid configuration and that prerequisite modules are passed correctly (code 0102, Prerequisite module missing, points to the same class of mistake).

Possible solution: Verify if you initialized the RealtimeKitClient correctly await RealtimeKitClient.init({ ... }). See RealtimeKitClient.

— Cloudflare, Error Codes (code 0001)

Error code 0002 and 0003: join or leave room failed

Section titled “Error code 0002 and 0003: join or leave room failed”

Failed to join room and Failed to leave room indicate the room lifecycle call did not complete. Retry meeting.join() or meeting.leave(); after a successful join, the client emits roomJoined on meeting.self. Meeting-level code 1003 adds explicit checks: the meeting must be active, the token must not be expired, and network connectivity must be working.

Once the join room process completes, you’ll see the roomJoined event is emitted on the meeting.self namespace.

— Cloudflare, Error Codes (code 0002)

Code 1005 (Meeting is in the INACTIVE state) means joining before the meeting has been started; start the meeting server-side or wait until it is active. Code 1004 (Unauthorised participant) points to token or preset authorisation, not transient network blips.

Invalid auth token means the participant JWT is missing, malformed, expired, or not valid for this meeting. The token must be a valid JWT that is not expired yet.

Possible solution: Ensure that the passed auth token is a valid JWT auth token that is not expired yet.

— Cloudflare, Error Codes (code 0004)

The same token rules apply to the Whiteboard plugin: pass the participant’s current token in the plugin URL fragment #authToken=<auth_token>, not as a query parameter (?authToken= is ignored). Symptoms include Rejoin the meeting (wrong, expired, or other-meeting token), Open the whiteboard from your meeting (no token), and Whiteboard link needs updating (token in query string instead of hash).

HTTP and WebSocket network errors: token, meeting state, and connectivity

Section titled “HTTP and WebSocket network errors: token, meeting state, and connectivity”

Codes 0011 (HTTP Network Error) and 0012 (Websocket Network Error) often combine internet problems with bad or expired auth tokens or an inactive meeting. Confirm connectivity (Cloudflare suggests a speed test at fast.com), that the meeting is active, and that the JWT is fresh.

Socket code 0404 (Missing prerequisites to establish a websocket connection) is rare and usually means required inputs—such as a JWT with meetingId and working network—were not met; it can also indicate an SDK integration bug.

For media, code 0014 (Media connection failed) means ICE failed. Allow WebRTC in the network and ensure turn.cloudflare.com and stun.cloudflare.com are reachable.

Possible solution: Make sure your network allows WebRTC connections and turn.cloudflare.com & stun.cloudflare.com are accessible.

— Cloudflare, Error Codes (code 0014)

Load-balancing troubleshooting elsewhere in Cloudflare docs gives a generic network fix that also applies when participants cannot download meeting assets: change Wi‑Fi, use wired Ethernet, or stabilise the connection (Common error codes).

Browser not supported and device permission errors

Section titled “Browser not supported and device permission errors”

Code 0010 (Browser not supported) means the browser is too old for WebRTC; upgrade to a current browser (documentation prefers Google Chrome). UI kits mirror this: RtkPermissionsMessage shows when camera or microphone are denied, with paths to continue or open system settings; RtkErrorView is a full-screen error with a retry button.

Device-related codes in the 11xx and 16xx families cover device not found, failed to access media device, device in use, screen share not supported, and OS-level denials (2101, 2201, 2301). Fixes are consistent: grant browser and OS permissions, free the device from other apps, reconnect hardware, and use a browser that supports screen sharing (Chrome, Edge, Firefox) for code 1105.

Permission denied: preset and host controls

Section titled “Permission denied: preset and host controls”

A large share of errors are Permission denied (0101, 0501, 0601, 1001, 1101, 1201, 2001, and host-specific 3003, 3006, 7000, etc.). The fix is always to check the participant’s preset: the action requires a capability that preset does not grant.

Host moderation maps directly to preset flags documented in Manage Participants in a Session:

Host action Preset permission Related error examples
Mute others’ audio Mute Audio (disable_participant_audio) 3003
Disable others’ video Mute Video (disable_participant_video) 3002
Pin a participant Pin Participant (pin_participant) 3000; only one pin at a time
Remove a participant Kick Participants (kick_participant) 3006
Send chat (chat send permission in preset) 4000, 0501
Start recording recording permission in preset 7000, 1001
Launch plugins plugin management permission 6000

This action requires the Mute Audio (disable_participant_audio) host control permission enabled in the local participant’s preset.

— Cloudflare, Manage Participants in a Session

Code 0904 (Invalid preset configuration) means preset JSON or flags are incompatible; review preset settings before debugging runtime permission errors.

Codes such as 0505, 0603, 0705, 1106, 1208, and chat or poll variants share one rule: the participant must meeting.join() before chat, plugins, polls, or device actions. If your app fires APIs on mount before join completes, you will see this repeatedly until you gate calls on roomJoined.

Recording errors and recorder preset flags

Section titled “Recording errors and recorder preset flags”

Recording module codes include 1004 (Recording not started), 1005 (Recording already in progress), and operation failures 7001–7003. Start recording before stop or status calls; only one active recording at a time.

Custom recorders built with the Recording SDKs guide must keep two preset flags straight:

The hidden_participant flag controls only the recorder’s visibility. When enabled, it hides the recorder from other participants in the meeting.

The is_recorder flag identifies the participant as a recorder and ensures that recording works correctly. If you create a custom recorder_preset_v2 preset to customize colors or the look and feel of the recording, you must keep is_recorder enabled. Removing is_recorder can cause the recording to fail.

— Cloudflare, Create Custom Recording App Using Recording SDKs

Removing hidden_participant does not break recording; it only makes the recorder visible to others.

Chat: 0502 invalid message body, 0503 / 4102 message too large, 4002 rate limit, 4201 unsupported file type—shorten messages, respect formats, and slow bursts. Message search disabled (0506) requires Cloudflare support.

Plugins: 0602 plugin not found (check plugin ID and that the plugin is enabled); 0601 permission; whiteboard-specific network errors (Cannot verify your meeting, Too many attempts)—retry after a minute. For clipboard issues in the whiteboard iframe, set allow="clipboard-read; clipboard-write" on the iframe before load (Whiteboard plugin).

Message broadcast (Message broadcast) is rate-limited client- and server-side (default deprecated client limit: five invocations per second); spotlight event type is reserved and cannot be used.

Stage: 2003 stage full, 2006 / 8000 stage not enabled for meeting type, 8003 user has not requested stage access—align preset and meeting type before stage APIs.

Participants: 1206 max participants, 1207 waiting room, 1209 participant removed—verify IDs and admission state before host actions.

Invalid preset configuration and internal exceptions

Section titled “Invalid preset configuration and internal exceptions”

Internal exception codes (0100, 0200, 0300, 0400, 0500, … module xx00) mean an unexpected failure inside that SDK module. Retry after checking client logs; if it persists, contact Cloudflare support—the same pattern as generic HTTP 500 guidance for Cloudflare APIs (Error responses).

Treat Worker proxy internal errors and unrelated Cloudflare product codes (Queues 15000, Snippets 1206, SSL custom cert code 2000, Cloudflare 1101 rendering errors) as different products unless your app logs explicitly show RealtimeKit codes from the Error Codes page.

  1. Calling chat, recording, or plugin APIs before meeting.join() completes.
  2. Reusing an expired JWT or embedding the whiteboard token in ?authToken= instead of #authToken=.
  3. Custom recorder presets with is_recorder disabled—recording fails silently or with recording module errors.
  4. Host UI that calls kick_participant or mute APIs without the matching preset permissions on the acting participant.
  5. Corporate firewalls blocking WebRTC or Cloudflare TURN/STUN hostnames while HTTP API calls still succeed (0011 vs 0014).
  6. Ignoring meeting INACTIVE (1005) when testing join flows.
  1. Reproduce the failure with the browser devtools console open and note the exact error code and message from RealtimeKit, then look it up in Error Codes.

  2. Confirm await RealtimeKitClient.init({ ... }) runs successfully and await meeting.join() emits roomJoined before other meeting APIs run.

  3. Decode the participant JWT expiry and meeting ID; refresh the token if you see 0004, 1004, whiteboard Rejoin the meeting, or network errors 0011 / 0012.

  4. From a affected network, verify general connectivity and WebRTC path (including reachability of turn.cloudflare.com and stun.cloudflare.com for media errors 0014).

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match your SDK version or you think a code mapping is wrong, email yimasynthetic@gmail.com with the page URL, the error code and message you see, and the sentence you want clarified.