Skip to main content
Android
iOS
Web
Windows
Unity
Flutter
React Native

Error codes

This page introduces the error codes and error messages that might be returned by the SDK when you call the Chat APIs.

Possible reasons for the errors are given to assist you in debugging. If you receive an error code not included here, Agora recommends you contact support@agora.io so that the technical support team can help resolve the issue.

The error codes and error messages might be returned in the following ways:

  • The return value when a method call fails.
  • The error code reported through the onError callback.
Error codeError messagePossible reason
0EM_NO_ERRORThe operation succeeds.
1GENERAL_ERRORDefault error related to the SDK or requests to the server. For example, the SDK is not properly initialized, or a request fails with no specific reason.
2NETWORK_ERRORThe SDK is disconnected from the server due to network interruption.
3DATABASE_ERRORThe database operation fails.
4EXCEED_SERVICE_LIMITThe usage exceeds the service limit. For example, the total number of registered users or contacts exceeds the limit of the current pricing plan.
8APP_ACTIVE_NUMBER_REACH_LIMITATIONThe app has reached its maximum number of daily active users (DAU) or monthly active users (MAU).
100INVALID_APP_KEYThe App Key is invalid. For how to get the App Key, see Get the information of the Agora Chat project.
101INVALID_USER_NAMEThe user ID is invalid. For example, when a user requests to add a contact, the user ID is set to an empty string.
102INVALID_PASSWORDThe login password is empty or invalid.
104INVALID_TOKENThe user token is empty or invalid.
105USER_NAME_TOO_LONGThe length of the user ID exceeds the limit of 64 bytes.
108TOKEN_EXPIREDThe token has expired.
109TOKEN_WILL_EXPIREThe token has passed half of its validity period.
110INVALID_PARAMInvalid parameter.
200USER_ALREADY_LOGINThe user has already logged in.
201USER_NOT_LOGINThe user hasn't logged in. For example, the login session is either invalid or has expired when a user requests to send a message or perform operations to a chat group.
202USER_AUTHENTICATION_FAILEDThe user authentication fails because the token is invalid or has expired.
203USER_ALREADY_EXISTThe user already exists: The user ID specified during user account registration already exists.
204USER_NOT_FOUNDThe user does not exist. For example, the user ID specified for login or retrieval of the conversation list of a user does not exist.
205USER_ILLEGAL_ARGUMENTIncorrect user parameter. For example, the user ID specified during user account registration or user attribute updating is invalid or empty.
206USER_LOGIN_ANOTHER_DEVICEThe user has logged in on another device. If the multi-device service is not enabled, the user is forced to log out of the current device upon successful login on another device with the same account.
207USER_REMOVEDThe user account is deleted on the Agora Console.
209PUSH_UPDATECONFIGS_FAILEDFails to update the push configurations. For example, a failure of changing the nickname displayed for message push or updating do-not-disturb settings.
210USER_PERMISSION_DENIEDThe user has no permission to perform this operation. For example, a user that is banned attempts to send a message.
213USER_BIND_ANOTHER_DEVICEThe user has logged in to another device. This error occurs when a user has logged in on one device and try to log in on another one with the same account, if the app is configured to persist the login state on the current device while preventing the login on another device in a single-device login scenario. This error code is deprecated.
214USER_LOGIN_TOO_MANY_DEVICESThe user has reached the maximum number of devices on which he or she can log in with the same user account. This error occurs on a device with auto login enabled in a multi-device login scenario if the app turns on the switch of login on another device never kicking the user off on a current login device when the maximum number of login devices is exceeded. For example, a user can log in on at most four devices. At first, the user stays logged in on four devices, A (with auto login enabled), B, C, D. Then, the user gets logged out on device A due to network disruption and logs in on device E manually. After the network is available, auto login is performed on device A and fails due to the limit of login devices, triggering this error.
215USER_MUTEDThe user is muted and not allowed to send messages in a chat group or chat room.
216USER_KICKED_BY_CHANGE_PASSWORDThe user has changed the login password. Once the login password is changed, the current login session ends and the user must log in again with the new password.
217USER_KICKED_BY_OTHER_DEVICEThe user gets kicked off from a device in a multi-device login scenario on the Agora Console or by calling an API on another device.
218USER_ALREADY_LOGIN_ANOTHERAnother user has logged in. This error occurs if a user attempts to log in on the same device with another account before logging out on the device with the current account.
219USER_MUTED_BY_ADMINThe user is muted globally and cannot send a message.
220USER_DEVICE_CHANGEDThe device on which a user attempts to log in is not the last one in a single-device login scenario. By default, if a user logs in on a another device, he or she will get kicked off from the current device in a single-device login scenario. This error occurs if the app turns on the switch of keeping the logged-in state on the current device if a user attempts to log in on another device.
221USER_NOT_ON_ROSTERThe user cannot send a message to another user that is not on the contact list. This error occurs if the switch of allowing message sending only between contacts is turned on.
300SERVER_NOT_REACHABLEThe server is not reachable. For example, the SDK is disconnected from the server due to unstable network conditions or other reasons when a user sends or recalls a message.
301SERVER_TIMEOUTThe request timeout. This error occurs when the server does not respond to an API request within the specified period, generally 30 or 60 seconds.
302SERVER_BUSYThe server is currently busy. Try again later.
303SERVER_UNKNOWN_ERRORA common error for requests to the server. As this error occurs in multiple cases, the user needs to further identify and troubleshoot issues according to logs.
304SERVER_GET_DNSLIST_FAILEDThe SDK fails in getting the configuration of the server that the app currently runs on.
305SERVER_SERVICE_RESTRICTEDThe app is banned. This error occurs if a user tries to call a method when the app is banned.
400FILE_NOT_FOUNDThe file is not found. For example, a log file is not found or downloading an attachment fails.
401FILE_INVALIDThe file is invalid. For example, uploading a message attachment or a shared file in the group fails.
402FILE_UPLOAD_FAILEDFails to upload a file. For example, uploading a message attachment fails.
403FILE_DOWNLOAD_FAILEDFails to download a file. For example, downloading a message attachment fails.
404FILE_DELETE_FAILEDFails to delete the existing log file. When a user retrieves a new log file, the existing log file, if any, will be deleted before a new one is generated.
405FILE_TOO_LARGEThe file is too large. For example, the message attachment or shared group file that a user attempts to upload exceeds the file size limit for upload.
406FILE_CONTENT_IMPROPERThe file content is inappropriate. For example, a message attachment or shared group file fails to be uploaded because the file contains inappropriate contents.
407FILE_IS_EXPIREDThe file has expired: For example, this error occurs when users download expired message attachments or group shared files. Message attachments and group shared files are stored for 7 days by default. To increase the storage time limit, contact support@agora.io.
500MESSAGE_INVALIDThe message is invalid. For example, during message sending, the message object or message ID is empty, or the user ID of the message sender is inconsistent with the user ID of the current login session.
501MESSAGE_INCLUDE_ILLEGAL_CONTENTThe message contains inappropriate content. This error occurs when a message is found by the filtering system to contain inappropriate content.
502MESSAGE_SEND_TRAFFIC_LIMITMessages are too large or sent too frequently. It is recommended that the user reduce the message sending frequency or the message size.
504MESSAGE_RECALL_TIME_LIMITThe message recall timeout. This error occurs when a message fails to be recalled because the timeout period expires.
505SERVICE_NOT_ENABLEDThe feature that the user is attempting to use is not enabled. This feature needs to be enabled on the Agora Console or by contacting support@agora.io before it is ready to use.
506MESSAGE_EXPIREDThe period for sending the read receipt for a group message has expired. The default validity period is 3 days.
507MESSAGE_ILLEGAL_WHITELISTThe user is not on the allow list of a group or chat room. This error occurs when a user that is not on the allow list attempts to send a message in a chat group or chat room if all members of the group or chat room are muted.
508MESSAGE_EXTERNAL_LOGIC_BLOCKEDDuring the pre-sending callback, the message that the user is attempting to send is blocked by a message filtering rule defined in the app server.
510MESSAGE_SIZE_LIMITThe body of the message to send exceeds the upper limit.
511MESSAGE_EDIT_FAILEDFails to modify a message.
600GROUP_INVALID_IDInvalid group ID. For a group-related API, the chat group ID is an empty string or invalid.
601GROUP_ALREADY_JOINEDThe user is already in this chat group. For example, the error occurs when a user attempts to join a chat group that he or she is already in.
602GROUP_NOT_JOINEDThe user hasn't joined this chat group. This error occurs when a user attempts to send a message or perform operations in a chat group that he or she is not in.
603GROUP_PERMISSION_DENIEDThe user does not have the permission to perform the operation to a chat group. For example, a chat group member does not have permission to add or remove a chat group admin.
604GROUP_MEMBERS_FULLThe number of members in the chat group has reached the upper limit specified during group creation.
605GROUP_SHARED_FILE_INVALIDIDThe ID of the shared file in the chat group is invalid.
606GROUP_NOT_EXISTThe chat group to which the user is requesting to perform operations does not exist.
607GROUP_DISABLEDThe chat group is disabled.
608GROUP_NAME_VIOLATIONThe chat group name is invalid.
609GROUP_MEMBER_ATTRIBUTES_REACH_LIMITThe number of custom attributes has reached the upper limit for a chat group member.
610GROUP_MEMBER_ATTRIBUTES_UPDATE_FAILEDFails to set custom attributes for a chat group member.
611GROUP_MEMBER_ATTRIBUTES_KEY_REACH_LIMITThe key of a custom attribute for a chat group member exceeds the limit of 16 bytes.
612GROUP_MEMBER_ATTRIBUTES_VALUE_REACH_LIMITThe value of a custom attribute for a chat group member exceeds the limit of 512 bytes.
700CHATROOM_INVALID_IDInvalid chat room ID. This error occurs when the chat room ID is an empty string for the chat room-related method that is used.
701CHATROOM_ALREADY_JOINEDThe user is already in the chat room. This error occurs when a user attempts to join a chat room that he or she is already in.
702CHATROOM_NOT_JOINEDThe user hasn't joined this chat room. This error occurs when a user attempts to send a message or perform operations in a chat room that he or she is not in.
703CHATROOM_PERMISSION_DENIEDThe user does not have the permission to perform the operation to a chat room. For example, a chat room member does not have permission to add or remove a chat room admin.
704CHATROOM_MEMBERS_FULLThe number of members in the chat room has reached the upper limit specified during chat room creation.
705CHATROOM_NOT_EXISTThe chat room to which the user is requesting to perform operations does not exist.
900USERINFO_USERCOUNT_EXCEEDThe number of users whose user attributes are to be retrieved exceeds 100.
901USERINFO_DATALENGTH_EXCEEDThe user attributes are too long. The total length of all user attributes cannot exceed 2 KB for a user or 10 GB for an app.
1000CONTACT_ADD_FAILEDFails to add a contact.
1001CONTACT_REACH_LIMITThe inviter has reached the maximum number of contacts that can be added.
1002CONTACT_REACH_LIMIT_PEERThe invitee has reached the maximum number of contacts that can be added.
1100PRESENCE_PARAM_LENGTH_EXCEEDThe length of a parameter in the presence-related API call exceeds the upper limit.
1101PRESENCE_CANNOT_SUBSCRIBE_YOURSELFThe user cannot subscribe to her or his own presence status.
1110TRANSLATE_PARAM_INVALIDTranslation parameter error.
1111TRANSLATE_SERVICE_NOT_ENABLEThe translation service has not been enabled. The translation service needs to be enabled on the Agora Console before it is ready to use.
1112TRANSLATE_USAGE_LIMITThe translation usage has reached the upper limit.
1113TRANSLATE_MESSAGE_FAILFails to translate the message.
1200MODERATION_FAILEDThe message moderation result provided by the third-party content moderation service is Rejected.
1299THIRD_SERVER_FAILEDThe content moderation result of another moderation service than the third-party service is Rejected.
1300REACTION_REACH_LIMITThe number of Reactions for the message has reached the maximum allowed.
1301REACTION_HAS_BEEN_OPERATEDThe user has added this Reaction and cannot add it repeatedly.
1302REACTION_OPERATION_IS_ILLEGALThe user does not have permission to operate on this Reaction. For example, a user that does not add this Reaction attempts to delete it or a user that is neither the message sender nor recipient tries to add a Reaction in a one-to-one chat.
1400THREAD_NOT_EXISTThe thread does not exist.
1401THREAD_ALREADY_EXISTThe thread to be created already exists.
1402THREAD_CREATE_MESSAGE_ILLEGALThe parent message for thread creation is invalid. For example, the message is recalled or unavailable.
1500PUSH_NOT_SUPPORTThe third-party push service is not supported. This error occurs if the configured third-party push service is not supported by the current device.
1501PUSH_BIND_FAILEDFails to bind the device with the push token provided by a third-party push service. This error occurs when the token of a third-party push service fails to be uploaded to the server.
1502PUSH_UNBIND_FAILEDFails to unbind the device from the push token provided by a third-party push service.
vundefined