Error codes

Updated

Introduces the error codes and error messages that might be returned by the SDK when you call the Agora Chat APIs.

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. Register the callback using the addEventListener method.
Error codeError messagePossible reasonFix
0REQUEST_SUCCESSThe operation succeeds.No action required.
-1REQUEST_TIMEOUTRequest times out.Retry or prompt for request timeout.
-2REQUEST_UNKNOWNUnidentified error occurs.Prompt that request failed.
-3REQUEST_PARAMETER_ERRORRequest parameters are invalid.Verify parameters are correct.
-4REQUEST_ABORTRequest is aborted.Cancel the request.
1WEBIM_CONNCTION_OPEN_ERRORRequest to retrieve token fails.Check for parameter error, already logged in status, or import request failure based on error message.
2WEBIM_CONNCTION_AUTH_ERRORApp Key is invalid. SDK fails to verify App Key.Verify App Key is initialized correctly, user is logged in, and login token is valid.
16WEBIM_CONNCTION_DISCONNECTEDWebSocket disconnected due to network issues.Prompt that connection is disconnected.
17WEBIM_CONNCTION_AJAX_ERRORCommon error for server requests.Determine cause of current operation failure from error message.
27WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERRORApp Key incorrect or not set during login.Set correct App Key.
28WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERRORUser fails to pass user token for login.Ensure successful login.
31WEBIM_CONNCTION_CALLBACK_INNER_ERRORInternal error in message sending callback.Check for errors in callback functions, such as in onTextMessage message processing.
39WEBIM_CONNECTION_CLOSEDUser logged out or not logged in attempts to send message.Log in before sending messages.
40WEBIM_CONNECTION_ERRORUser authentication fails.Prompt that connection is disconnected.
50MAX_LIMITUsage exceeds service limit. Reactions, DAU, or MAU exceed upper limits.Identify which service reached upper limit and limit accordingly.
51MESSAGE_NOT_FOUNDMessage not found, such as when reporting.Prompt that original message wasn't found.
52NO_PERMISSIONUser lacks permission for operation.Indicate user doesn't have permission for operation.
53OPERATION_UNSUPPORTEDCurrent operation not supported.Prompt that operation isn't supported.
55LOCAL_DB_OPERATION_FAILEDDatabase operation fails.Check database connection and permissions.
101WEBIM_UPLOADFILE_ERRORFailed to upload file. File may exceed size limit.Show "Send Failed" when attachment message upload fails.
102WEBIM_UPLOADFILE_NO_LOGINUser token not included in file upload request.Ensure user is logged in before uploading.
200WEBIM_DOWNLOADFILE_ERRORFailed to download file due to timeout or network failure.Prompt to retry.
204USER_NOT_FOUNDUser not found, such as when inviting to join group.Verify User ID parameter is correct.
205MESSAGE_PARAMETER_ERRORMessage parameter error, such as missing message ID during recall.Ensure message contains message ID (id) and recipient's user ID (to).
206WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICEUser logged in on another device. Forces logout if multi-device service isn't enabled.Enable multi-device function. See Multiple Device Login documentation.
207WEBIM_CONNCTION_USER_REMOVEDUser account deleted in console.Inform user that account has been canceled.
208WEBIM_USER_ALREADY_LOGINUser already logged in and attempting to log in again.Notify that repeated logins aren't possible.
216WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORDUser changed login password, ending current session.Prompt that password has changed and user must log in again.
217WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICEUser kicked off device via console or API call from another device.Notify user of being kicked offline.
219USER_MUTED_BY_ADMINUser muted globally and cannot send messages.Inform user they have been banned.
221USER_NOT_FRIENDUser cannot send message to non-contact when contacts-only messaging enabled.Prompt that recipient isn't user's friend/contact.
500SERVER_BUSYServer is busy.Prompt that service is busy and to try again.
501MESSAGE_INCLUDE_ILLEGAL_CONTENTMessage contains inappropriate content detected by filtering system.Alert that message failed to send due to non-compliant content or sensitive words.
502MESSAGE_EXTERNAL_LOGIC_BLOCKEDMessage intercepted by anti-spam service.Prompt that message failed to send.
503SERVER_UNKNOWN_ERRORSDK fails to send message due to unknown error.Prompt that message failed to send.
504MESSAGE_RECALL_TIME_LIMITMessage recall timeout.Notify user that retractable time limit has been exceeded.
505SERVICE_NOT_ENABLEDFeature not enabled. Requires console activation or support contact.Enable function according to error message.
506SERVICE_NOT_ALLOW_MESSAGINGUser not on group/chat room allow list when all members are muted.Inform user that current group/chat room has message restrictions.
507SERVICE_NOT_ALLOW_MESSAGING_MUTEUser is muted in group or chat room.Inform user they have been banned.
508MESSAGE_MODERATION_BLOCKEDThird-party content moderation service rejected message.Prompt that message delivery failed due to non-compliant content.
510MESSAGE_WEBSOCKET_DISCONNECTEDFailed to send message due to network disconnection or reconnection failure.Prompt that message failed to send.
511MESSAGE_SIZE_LIMITMessage body exceeds upper limit.Alert that message is too large.
512MESSAGE_SEND_TIMEOUTSend message timeout. Connection disconnected while sending.Notify of send timeout.
601GROUP_ALREADY_JOINEDUser already in chat group.Verify invited users aren't already in group to avoid duplicate invitations.
602GROUP_NOT_JOINEDUser not in chat group when attempting operations.Ensure user is in group before performing operations.
603PERMISSION_DENIEDUser lacks permission for group operation.Indicate user doesn't have required permission.
604WEBIM_LOAD_MSG_ERRORInternal error in message callback.Verify message is formatted correctly as parsing failed.
605GROUP_NOT_EXISTGroup ID doesn't exist.Verify group or chat room ID is correct.
606GROUP_MEMBERS_FULLGroup member count reached upper limit.Indicate maximum group size has been reached.
607GROUP_MEMBERS_LIMITMaximum group member count exceeds pricing plan limit.Limit maximum members according to subscription package.
609GROUP_MEMBER_ATTRIBUTES_SET_FAILEDFailed to set custom attributes for group member.Prompt that setup failed and to try again.
700REST_PARAMS_STATUSFailed to call API due to missing/incorrect token or App Key.Set App Key correctly.
702CHATROOM_NOT_JOINEDUser not in chat room when attempting operations.Indicate user isn't in current chat room.
704CHATROOM_MEMBERS_FULLChat room member count reached upper limit.Indicate chat room is at capacity.
705CHATROOM_NOT_EXISTChat room doesn't exist.Verify chat room ID is correct.
999SDK_RUNTIME_ERRORWebSocket error during message sending.Prompt login failure and suggest logging in again.
1100PRESENCE_PARAM_EXCEEDPresence parameter length exceeds limit.Keep custom online status under 1024 bytes.
1101REACTION_ALREADY_ADDEDUser already added this Reaction.Avoid adding duplicate Reactions for same user.
1102REACTION_CREATINGReaction being created by another user simultaneously.Indicate another user is creating a Reaction.
1103REACTION_OPERATION_IS_ILLEGALUser lacks permission for Reaction operation.Ensure users operate Reactions correctly with proper permissions.
1200TRANSLATION_NOT_VALIDLanguage code is invalid.Verify correct language code when using translation.
1201TRANSLATION_TEXT_TOO_LONGSource text length exceeds translation limit.Alert that file is too large for translation.
1204TRANSLATION_FAILEDFailed to translate message.Notify of translation failure.
1300THREAD_NOT_EXISTThread doesn't exist.Verify subzone ID is correct.
1301THREAD_ALREADY_EXISTThread already exists.Notify that subdivision already exists and cannot be created again.
1302MODIFY_MESSAGE_NOT_EXISTMessage to modify doesn't exist.Verify message ID is correct.
1304MODIFY_MESSAGE_FAILEDFailed to modify message.Inform user that message modification failed.