Error codes
This page lists the possible error codes and error messages returned by the SDK when you call Chat APIs.
Possible reasons for these errors are provided to help you debug more efficiently. If you encounter an error code that is not listed here, contact support@agora.io for assistance.
You may receive an error code and error message in one of the following ways:
- As the return value when a method call fails.
- As the error code reported through the
onError
callback.
Error code | Error message | Possible reason | Fix |
---|---|---|---|
0 | EM | The operation succeeds. | No action required. |
1 | GENERAL | Default error related to the SDK or API requests. Occurs when SDK isn't properly initialized or a request fails without specific reason. | Analyze logs and called APIs. |
2 | NETWORK | SDK disconnected from server due to network interruption. | Retry operation after network restoration. |
3 | DATABASE | Database operation fails. | Analyze called API with logs. Error occurs when updating non-existent messages with Conversation#updateMessage or when database isn't open during operations. |
4 | EXCEED | Usage exceeds service limit, such as registered users or contacts exceeding current pricing plan limits. | Check API parameters. Control limit parameter values. For rate limiting, retry after delay. |
8 | APP | App reached maximum daily active users (DAU) or monthly active users (MAU). | Upgrade Chat service in the console. |
100 | INVALID | App Key is invalid. | Initialize with correct App Key. |
101 | INVALID | User ID is invalid, such as empty string when adding a contact. | Ensure user ID parameter is not null. |
102 | INVALID | Login password is empty or invalid. | Verify password parameter is correct. |
103 | INVALID | URL is incorrect. | Verify API parameters are correct. |
104 | INVALID | User token is empty or invalid. | Verify token parameters are correct. |
105 | USER | User ID exceeds 64 bytes limit. | Check user ID length. |
108 | TOKEN | Token has expired. | When callback received, regenerate token and call loginWithToken to log in again. |
109 | TOKEN | Token passed half of its validity period. | When callback received, regenerate token and call ChatClient#renewToken to update. |
110 | INVALID | Invalid parameter. | Verify API parameters are valid. |
200 | USER | User already logged in. | Check if SDK has automatic login enabled or if login method was already called. |
201 | USER | User not logged in. Session invalid or expired when attempting operations. | Ensure Chat login completes before calling API. |
202 | USER | User authentication fails due to invalid or expired token. | If logged out, log in again. Otherwise, regenerate token and call ChatClient#renewToken . |
203 | USER | User ID specified during registration already exists. | Register with a different user ID. |
204 | USER | User does not exist. | Verify user ID parameter is correct. |
205 | USER | Incorrect user parameter. User ID invalid or empty during registration or attribute updates. | Verify API parameters are correct. |
206 | USER | User logged in on another device. Forces logout on current device if multi-device service isn't enabled. | When ConnectionListener#onLogout is triggered, log in again. |
207 | USER | User account deleted in the console. | When ConnectionListener#onLogout is triggered, return to login page. Account no longer available. |
209 | PUSH | Failed to update push configurations. | Check error-reporting API, wait, then retry. |
210 | USER | User lacks permission for operation.
| Verify user has operation permission. |
211 | USER | Failed to bind push token to device. | Verify token for device push binding isn't empty. |
212 | USER | Failed to unbind push token from device. | Retry ChatClient#logout . For guaranteed exit, call with parameter set to false (unbind). |
213 | USER | User logged in to another device in single-device login configuration. | Configure for multiple device login or use ChatClient#kickDeviceWithToken before logging in. |
214 | USER | User reached maximum number of login devices. | Increase allowed simultaneous devices or use ChatClient#kickDeviceWithToken before logging in. |
215 | USER | User is muted in group or chat room. | Restrict message sending in UI for users who are banned. |
216 | USER | User changed login password, ending current session. | When ConnectionListener#onLogout is received, call ChatClient#logout and return to login page. |
217 | USER | User kicked off device via console or API call from another device. | When ConnectionListener#onLogout is received, call ChatClient#logout and return to login page. |
218 | USER | Another user already logged in on device. | Call ChatClient#logout to log out current account before logging in with different account. |
219 | USER | User cannot send message when all members are muted. | Restrict message sending in UI when full ban is active. |
220 | USER | Login attempt on device that isn't the last used device in single-device configuration. | When ConnectionListener#onLogout is received, call ChatClient#logout and return to login page. |
221 | USER | User cannot send message to non-contact when contacts-only messaging enabled. | Call ContactManager#addContact first. Send messages after friend request is accepted. |
300 | SERVER | Server unreachable due to network issues. | For login errors, try switching networks or contacting support for TLS encryption in specific regions. For other operations, switch networks or retry after delay. |
301 | SERVER | Request timeout when server doesn't respond within specified period. | Retry API after switching networks or waiting. |
302 | SERVER | Server currently busy. | Check for repeated API calls. May occur when calling again before previous result returned. |
303 | SERVER | Common server request error. | Provide logs and called APIs for troubleshooting. |
304 | SERVER | SDK fails to get server configuration. | If ChatOptions#enableDNSConfig is false , check server settings. Otherwise, likely network issue during dnsConfig request. |
305 | SERVER | App is banned. | Enable Chat feature in console or contact support. |
400 | FILE | File not found. | For log files, retry. For attachments, file no longer exists and cannot be downloaded. |
401 | FILE | File invalid. | Select different file and retry upload. |
402 | FILE | Failed to upload file. | Analyze with API calls and logs. |
403 | FILE | Failed to download file. | Check network or message expiration in logs. |
404 | FILE | Failed to delete existing log file. | Check permissions for app log files or chat logs. |
405 | FILE | File exceeds size limit. | Select file under 10 MB or contact support to increase limit. |
406 | FILE | File content inappropriate. | Select appropriate file and retry. |
407 | FILE | File expired. Attachments stored for 7 days by default. | Contact support to increase storage time. |
500 | MESSAGE | Message invalid. Message object or ID empty, or sender ID inconsistent with login session. | Verify message construction, ID, sender, and body settings. |
501 | MESSAGE | Message contains inappropriate content. | View blocking logs in console. |
504 | MESSAGE | Message recall timeout. | Show UI error or contact support to extend the retractability time. |
505 | SERVICE | Feature not enabled. | Enable required functions in console based on API and log analysis. |
506 | MESSAGE | Group message read receipt period expired. Default validity is 3 days. | Show UI error or contact support to extend the validity time. |
507 | MESSAGE | User not on allow list when all members are muted. | Show UI error or check if group-wide ban is enabled. |
508 | MESSAGE | Message blocked by app server filtering rule during pre-sending callback. | Show UI prompt or check the pre-sending callback logs. |
510 | MESSAGE | Message body exceeds limit. | Show UI prompt or reduce the message length (max 5 KB by default). |
511 | MESSAGE | Failed to modify message. | Analyze with logs. |
600 | GROUP | Invalid group ID. | Verify group ID parameter isn't null or disbanded. |
601 | GROUP | User already in chat group. | Handle as successful join. |
602 | GROUP | User not in chat group. | Verify group ID is for joined group that hasn't been disbanded. |
603 | GROUP | User lacks permission for group operation. | Check API call permissions. |
604 | GROUP | Group member count reached limit. | Show UI prompt or check if the maximum member count exceeds limit (default 200). |
605 | GROUP | Group shared file ID invalid. | Verify sharedFileId parameter isn't null. |
606 | GROUP | Chat group doesn't exist. | Verify group ID is correct or not from disbanded group. |
607 | GROUP | Chat group is disabled. | Show UI prompt to request unblock from administrator. |
608 | GROUP | Chat group name invalid. | Check if group name contains sensitive information. |
609 | GROUP | Custom attributes length reached limit. | Total length for single group member cannot exceed 4 KB. |
610 | GROUP | Failed to set custom attributes. | Analyze with API calls and logs. |
611 | GROUP | Custom attribute key exceeds 16 bytes. | Check if attribute key exceeds limit. |
612 | GROUP | Custom attribute value exceeds 512 bytes. | Check if attribute value exceeds limit. |
613 | GROUP | User is in group blacklist. | Show UI prompt or check console for blacklist status. |
700 | CHATROOM | Invalid chat room ID. | Check if chat room ID is empty. |
701 | CHATROOM | User already in chat room. | Handle as successful join. |
702 | CHATROOM | User not in chat room. | Verify chat room ID is correct, not disbanded, or previously joined. |
703 | CHATROOM | User lacks permission for chat room operation. | Check API call permissions. |
704 | CHATROOM | Chat room member count reached limit. | Check maximum member count setting. |
705 | CHATROOM | Chat room doesn't exist. | Verify chat room ID is correct, not disbanded, or previously joined. |
706 | CHATROOM | Chat room owner not allowed to leave. | Check ChatOptions#allowChatroomOwnerLeave setting. |
707 | CHATROOM | User is in chat room blacklist. | Check console for chat room blacklist status. |
900 | USERINFO | User attribute retrieval count exceeds 100. | Get attributes in batches of up to 100 users. |
901 | USERINFO | User attributes too long. Maximum 2 KB per user or 10 GB per app. | Check attribute length limits. |
1000 | CONTACT | Failed to add contact. | Analyze with API calls and error description. |
1001 | CONTACT | Inviter reached maximum contacts limit. | Show UI error or contact support to increase limit. |
1002 | CONTACT | Invitee reached maximum contacts limit. | Show UI error or contact support to increase limit. |
1100 | PRESENCE | Presence parameter length exceeds limit. | Presence details cannot exceed 64 bytes. |
1101 | PRESENCE | User cannot subscribe to own presence status. | Check if subscribed user ID is own ID. |
1110 | TRANSLATE | Translation parameter error. | Analyze with debug logs. |
1111 | TRANSLATE | Translation service not enabled. | Enable translation service in console. |
1112 | TRANSLATE | Translation usage reached limit. | Contact support to renew translation usage. |
1113 | TRANSLATE | Failed to translate message. | Analyze with debug logs. |
1200 | MODERATION | Third-party content moderation result is Rejected . | Check content audit configuration and logs in console. |
1299 | THIRD | Non-third-party moderation service result is Rejected . | Check content audit configuration and logs in console. |
1300 | REACTION | Message Reactions reached maximum allowed. | Show UI prompt or contact support to increase limit. |
1301 | REACTION | User already added this Reaction. | Handle as successful addition. |
1302 | REACTION | User lacks permission for Reaction operation. | Verify parameters with log analysis. |
1400 | THREAD | Thread doesn't exist. | Verify subzone ID is correct. |
1401 | THREAD | Thread already exists. | Check if subzone already created under incoming message. |
1500 | PUSH | Third-party push service not supported. | Check documentation for missing device vendors or contact support. |
1501 | PUSH | Failed to bind device with push token. | After PushHelper#setPushListener is registered, check network and retry binding with PushManager#bindDeviceToken . |
1502 | PUSH | Failed to unbind device from push token. | After PushHelper#setPushListener is registered, retry ChatClient#logout or call with parameter false (without unbinding). |