0 means success; anything non-zero is an error.
There are two kinds of error codes: 4–5 digit codes are business error codes returned by the server, and 6-digit codes are produced by the client SDK itself. A 6-digit code is platform prefix + 3-digit low code. The low 3 digits are assigned from the unified table on this page, and the same low code means the same thing on every platform.
How to read an error code
So
102231 and 106231 read as the same error (camera permission denied), coming from Android and Web respectively.
Platform types
The Swift SDK supports both iOS and macOS and uses the
103 or 105 prefix depending on the platform it runs on.Branch on codes, not messages
- Decide the error type by its code only. The SDK’s own error messages are always in English, are meant for developers and logs, and change between versions. Don’t branch on them, and don’t show them to end users
- Map error codes to your own end-user messages. Each platform’s error code page has a “Suggested user message” column you can start from
- To compare the same kind of error across platforms, you can compare only the low 3 digits (each SDK exposes a field such as
baseCode; see that platform’s error code page)
The language parameter
Each SDK provides alanguage setting (the name follows each platform’s API reference, for example the language init parameter on Web and rtc_set_language in the C SDK):
- The value is a language tag such as
zh-CNoren. If you don’t set it, it follows the system language, falling back to Chinese if that isn’t available - The SDK sends
Accept-Languagewith its server requests, and the messages of server business errors (1000–99999) come back in Chinese or English accordingly - The SDK’s own errors (6-digit codes) are always in English and aren’t affected by
language
Unified table (low 3 digits)
Ranges:000–099 general meanings; 200–299 channel / device specifics; 300–349 media streaming.
Each meaning has exactly one code, and every platform uses the same code for the same situation. Not every platform produces every code; see each platform’s error code page for the codes it actually produces.
Codes that are easy to confuse, resolved by “the most specific cause wins”:
- The media connection failed to be created, or entered failed / closed → 015, whether during publish, subscribe, or joining the channel
- Reconnecting, retry later → 014; the engine was closed or destroyed → 023
- Publishing / subscribing while the media streaming engine isn’t connected (and isn’t reconnecting), or being rejected / failing negotiation with no more specific code → 300 / 301
- Not supported in the current environment → 032, not 018 (capture failed)
Which platforms have shipped the new codes
This table is version 2, finalized on 2026-09-30. Each platform follows the version in which it ships the new codes. Platforms that haven’t shipped yet still use the codes listed on their own error code pages.Old code → new code mapping
Old common codes 100001–100012
The 100xxx common codes that some platforms (iOS Objective-C, Windows, and others) exposed in older versions are retired and replaced with “platform prefix + low 3 digits”. For example, the old 100008 (token invalid) becomes “platform prefix + 004”. This takes effect once that platform ships the new codes.
Platforms that have shipped the new codes
Mappings for the other platforms (Android, iOS Objective-C, HarmonyOS, Windows) will be given in each platform’s changelog when it ships the new codes.
Using it when troubleshooting
Full error code tables for each platform:
Web · Android · Windows · Swift · iOS · HarmonyOS (Chinese) · C · Python
Read the C SDK at two levels. Its API return values are simple status values such as
0 / -1 / -2 / -3 / -4; they only express the result of the call and carry no reason. Get the actual reason with rtc_get_last_error; it’s also written to the log, which contains both the SDK’s own 180xxx codes and 1xxx codes passed through from the server. See C SDK error codes.Difference from SMeeting
Same rules, only a different product layer number: SRTC uses10, SMeeting uses 20, and the low 3 digits of the two layers are two independent tables.
If you use SMeeting, you see both kinds of error codes: 20Nxxx come from the meeting layer, and 10Nxxx come from the underlying SRTC (passed through unchanged by the meeting layer to help you locate the problem). See SMeeting error code format and unified table.