# Error codes (/en/realtime-media/im/reference/error-codes/web)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

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](mailto\: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 code | Error message                                    | Possible reason                                                                        | Fix                                                                                                    |
    | :--------- | :----------------------------------------------- | :------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------- |
    | `0`        | `REQUEST_SUCCESS`                                | The operation succeeds.                                                                | No action required.                                                                                    |
    | `-1`       | `REQUEST_TIMEOUT`                                | Request times out.                                                                     | Retry or prompt for request timeout.                                                                   |
    | `-2`       | `REQUEST_UNKNOWN`                                | Unidentified error occurs.                                                             | Prompt that request failed.                                                                            |
    | `-3`       | `REQUEST_PARAMETER_ERROR`                        | Request parameters are invalid.                                                        | Verify parameters are correct.                                                                         |
    | `-4`       | `REQUEST_ABORT`                                  | Request is aborted.                                                                    | Cancel the request.                                                                                    |
    | `1`        | `WEBIM_CONNCTION_OPEN_ERROR`                     | Request to retrieve token fails.                                                       | Check for parameter error, already logged in status, or import request failure based on error message. |
    | `2`        | `WEBIM_CONNCTION_AUTH_ERROR`                     | App Key is invalid. SDK fails to verify App Key.                                       | Verify App Key is initialized correctly, user is logged in, and login token is valid.                  |
    | `16`       | `WEBIM_CONNCTION_DISCONNECTED`                   | WebSocket disconnected due to network issues.                                          | Prompt that connection is disconnected.                                                                |
    | `17`       | `WEBIM_CONNCTION_AJAX_ERROR`                     | Common error for server requests.                                                      | Determine cause of current operation failure from error message.                                       |
    | `27`       | `WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR`        | App Key incorrect or not set during login.                                             | Set correct App Key.                                                                                   |
    | `28`       | `WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR`         | User fails to pass user token for login.                                               | Ensure successful login.                                                                               |
    | `31`       | `WEBIM_CONNCTION_CALLBACK_INNER_ERROR`           | Internal error in message sending callback.                                            | Check for errors in callback functions, such as in `onTextMessage` message processing.                 |
    | `39`       | `WEBIM_CONNECTION_CLOSED`                        | User logged out or not logged in attempts to send message.                             | Log in before sending messages.                                                                        |
    | `40`       | `WEBIM_CONNECTION_ERROR`                         | User authentication fails.                                                             | Prompt that connection is disconnected.                                                                |
    | `50`       | `MAX_LIMIT`                                      | Usage exceeds service limit. Reactions, DAU, or MAU exceed upper limits.               | Identify which service reached upper limit and limit accordingly.                                      |
    | `51`       | `MESSAGE_NOT_FOUND`                              | Message not found, such as when reporting.                                             | Prompt that original message wasn't found.                                                             |
    | `52`       | `NO_PERMISSION`                                  | User lacks permission for operation.                                                   | Indicate user doesn't have permission for operation.                                                   |
    | `53`       | `OPERATION_UNSUPPORTED`                          | Current operation not supported.                                                       | Prompt that operation isn't supported.                                                                 |
    | `55`       | `LOCAL_DB_OPERATION_FAILED`                      | Database operation fails.                                                              | Check database connection and permissions.                                                             |
    | `101`      | `WEBIM_UPLOADFILE_ERROR`                         | Failed to upload file. File may exceed size limit.                                     | Show "Send Failed" when attachment message upload fails.                                               |
    | `102`      | `WEBIM_UPLOADFILE_NO_LOGIN`                      | User token not included in file upload request.                                        | Ensure user is logged in before uploading.                                                             |
    | `200`      | `WEBIM_DOWNLOADFILE_ERROR`                       | Failed to download file due to timeout or network failure.                             | Prompt to retry.                                                                                       |
    | `204`      | `USER_NOT_FOUND`                                 | User not found, such as when inviting to join group.                                   | Verify User ID parameter is correct.                                                                   |
    | `205`      | `MESSAGE_PARAMETER_ERROR`                        | Message parameter error, such as missing message ID during recall.                     | Ensure message contains message ID (`id`) and recipient's user ID (`to`).                              |
    | `206`      | `WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE`      | User logged in on another device. Forces logout if multi-device service isn't enabled. | Enable multi-device function. See Multiple Device Login documentation.                                 |
    | `207`      | `WEBIM_CONNCTION_USER_REMOVED`                   | User account deleted in console.                                                       | Inform user that account has been canceled.                                                            |
    | `208`      | `WEBIM_USER_ALREADY_LOGIN`                       | User already logged in and attempting to log in again.                                 | Notify that repeated logins aren't possible.                                                           |
    | `216`      | `WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD` | User changed login password, ending current session.                                   | Prompt that password has changed and user must log in again.                                           |
    | `217`      | `WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE`    | User kicked off device via console or API call from another device.                    | Notify user of being kicked offline.                                                                   |
    | `219`      | `USER_MUTED_BY_ADMIN`                            | User muted globally and cannot send messages.                                          | Inform user they have been banned.                                                                     |
    | `221`      | `USER_NOT_FRIEND`                                | User cannot send message to non-contact when contacts-only messaging enabled.          | Prompt that recipient isn't user's friend/contact.                                                     |
    | `500`      | `SERVER_BUSY`                                    | Server is busy.                                                                        | Prompt that service is busy and to try again.                                                          |
    | `501`      | `MESSAGE_INCLUDE_ILLEGAL_CONTENT`                | Message contains inappropriate content detected by filtering system.                   | Alert that message failed to send due to non-compliant content or sensitive words.                     |
    | `502`      | `MESSAGE_EXTERNAL_LOGIC_BLOCKED`                 | Message intercepted by anti-spam service.                                              | Prompt that message failed to send.                                                                    |
    | `503`      | `SERVER_UNKNOWN_ERROR`                           | SDK fails to send message due to unknown error.                                        | Prompt that message failed to send.                                                                    |
    | `504`      | `MESSAGE_RECALL_TIME_LIMIT`                      | Message recall timeout.                                                                | Notify user that retractable time limit has been exceeded.                                             |
    | `505`      | `SERVICE_NOT_ENABLED`                            | Feature not enabled. Requires console activation or support contact.                   | Enable function according to error message.                                                            |
    | `506`      | `SERVICE_NOT_ALLOW_MESSAGING`                    | User not on group/chat room allow list when all members are muted.                     | Inform user that current group/chat room has message restrictions.                                     |
    | `507`      | `SERVICE_NOT_ALLOW_MESSAGING_MUTE`               | User is muted in group or chat room.                                                   | Inform user they have been banned.                                                                     |
    | `508`      | `MESSAGE_MODERATION_BLOCKED`                     | Third-party content moderation service rejected message.                               | Prompt that message delivery failed due to non-compliant content.                                      |
    | `510`      | `MESSAGE_WEBSOCKET_DISCONNECTED`                 | Failed to send message due to network disconnection or reconnection failure.           | Prompt that message failed to send.                                                                    |
    | `511`      | `MESSAGE_SIZE_LIMIT`                             | Message body exceeds upper limit.                                                      | Alert that message is too large.                                                                       |
    | `512`      | `MESSAGE_SEND_TIMEOUT`                           | Send message timeout. Connection disconnected while sending.                           | Notify of send timeout.                                                                                |
    | `601`      | `GROUP_ALREADY_JOINED`                           | User already in chat group.                                                            | Verify invited users aren't already in group to avoid duplicate invitations.                           |
    | `602`      | `GROUP_NOT_JOINED`                               | User not in chat group when attempting operations.                                     | Ensure user is in group before performing operations.                                                  |
    | `603`      | `PERMISSION_DENIED`                              | User lacks permission for group operation.                                             | Indicate user doesn't have required permission.                                                        |
    | `604`      | `WEBIM_LOAD_MSG_ERROR`                           | Internal error in message callback.                                                    | Verify message is formatted correctly as parsing failed.                                               |
    | `605`      | `GROUP_NOT_EXIST`                                | Group ID doesn't exist.                                                                | Verify group or chat room ID is correct.                                                               |
    | `606`      | `GROUP_MEMBERS_FULL`                             | Group member count reached upper limit.                                                | Indicate maximum group size has been reached.                                                          |
    | `607`      | `GROUP_MEMBERS_LIMIT`                            | Maximum group member count exceeds pricing plan limit.                                 | Limit maximum members according to subscription package.                                               |
    | `609`      | `GROUP_MEMBER_ATTRIBUTES_SET_FAILED`             | Failed to set custom attributes for group member.                                      | Prompt that setup failed and to try again.                                                             |
    | `700`      | `REST_PARAMS_STATUS`                             | Failed to call API due to missing/incorrect token or App Key.                          | Set App Key correctly.                                                                                 |
    | `702`      | `CHATROOM_NOT_JOINED`                            | User not in chat room when attempting operations.                                      | Indicate user isn't in current chat room.                                                              |
    | `704`      | `CHATROOM_MEMBERS_FULL`                          | Chat room member count reached upper limit.                                            | Indicate chat room is at capacity.                                                                     |
    | `705`      | `CHATROOM_NOT_EXIST`                             | Chat room doesn't exist.                                                               | Verify chat room ID is correct.                                                                        |
    | `999`      | `SDK_RUNTIME_ERROR`                              | WebSocket error during message sending.                                                | Prompt login failure and suggest logging in again.                                                     |
    | `1100`     | `PRESENCE_PARAM_EXCEED`                          | Presence parameter length exceeds limit.                                               | Keep custom online status under 1024 bytes.                                                            |
    | `1101`     | `REACTION_ALREADY_ADDED`                         | User already added this Reaction.                                                      | Avoid adding duplicate Reactions for same user.                                                        |
    | `1102`     | `REACTION_CREATING`                              | Reaction being created by another user simultaneously.                                 | Indicate another user is creating a Reaction.                                                          |
    | `1103`     | `REACTION_OPERATION_IS_ILLEGAL`                  | User lacks permission for Reaction operation.                                          | Ensure users operate Reactions correctly with proper permissions.                                      |
    | `1200`     | `TRANSLATION_NOT_VALID`                          | Language code is invalid.                                                              | Verify correct language code when using translation.                                                   |
    | `1201`     | `TRANSLATION_TEXT_TOO_LONG`                      | Source text length exceeds translation limit.                                          | Alert that file is too large for translation.                                                          |
    | `1204`     | `TRANSLATION_FAILED`                             | Failed to translate message.                                                           | Notify of translation failure.                                                                         |
    | `1300`     | `THREAD_NOT_EXIST`                               | Thread doesn't exist.                                                                  | Verify subzone ID is correct.                                                                          |
    | `1301`     | `THREAD_ALREADY_EXIST`                           | Thread already exists.                                                                 | Notify that subdivision already exists and cannot be created again.                                    |
    | `1302`     | `MODIFY_MESSAGE_NOT_EXIST`                       | Message to modify doesn't exist.                                                       | Verify message ID is correct.                                                                          |
    | `1304`     | `MODIFY_MESSAGE_FAILED`                          | Failed to modify message.                                                              | Inform user that message modification failed.                                                          |

    
  
      
  
      
  
      
  
      
  
