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

> 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.

    During runtime of the Agora Chat SDK, 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.

    For example, when a user registration request fails because the username already exists, the `onError` callback returns the following error code and error message:

    ```csharp
    SDKClient.Instance.Login(
        username,
        passwd,
        callback: new CallBack(
            onSuccess: () =>
            {
            },
            onError: (code, desc) =>
            {
                // code: 203
                // desc: USER_ALREADY_EXIST
            }
        )
    );
    ```

    | Error code | Error message                               | Error description                                                                                                                                                                                                                                              | Fix                                                                                                                                                             |
    | :--------- | :------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `0`        | `EM_NO_ERROR`                               | The operation succeeds.                                                                                                                                                                                                                                        | No action required.                                                                                                                                             |
    | `1`        | `GENERAL_ERROR`                             | The SDK is not properly initialized, or the server cannot identify this error.                                                                                                                                                                                 | Analyze logs and called APIs.                                                                                                                                   |
    | `2`        | `NETWORK_ERROR`                             | SDK disconnected from server due to network interruption.                                                                                                                                                                                                      | Retry operation after network restoration.                                                                                                                      |
    | `3`        | `DATABASE_ERROR`                            | 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_SERVICE_LIMIT`                      | Usage exceeds service limit, such as registered users exceeding current pricing plan limits.                                                                                                                                                                   | Check API parameters. Control `limit` parameter values. For rate limiting, retry after delay.                                                                   |
    | `8`        | `APP_ACTIVE_NUMBER_REACH_LIMITATION`        | App reached maximum daily active users (DAU) or monthly active users (MAU).                                                                                                                                                                                    | Upgrade Chat service in the console.                                                                                                                            |
    | `100`      | `INVALID_APP_KEY`                           | App Key is invalid.                                                                                                                                                                                                                                            | Initialize with correct App Key.                                                                                                                                |
    | `101`      | `INVALID_USER_NAME`                         | User ID is invalid, such as empty string when adding a contact.                                                                                                                                                                                                | Ensure user ID parameter is not null.                                                                                                                           |
    | `102`      | `INVALID_PASSWORD`                          | Login password is empty or invalid.                                                                                                                                                                                                                            | Verify password parameter is correct.                                                                                                                           |
    | `103`      | `INVALID_URL`                               | URL is incorrect.                                                                                                                                                                                                                                              | Verify API parameters are correct.                                                                                                                              |
    | `104`      | `INVALID_TOKEN`                             | Login token is empty or invalid.                                                                                                                                                                                                                               | Verify token parameters are correct.                                                                                                                            |
    | `105`      | `USER_NAME_TOO_LONG`                        | User ID exceeds 64 bytes limit.                                                                                                                                                                                                                                | Check user ID length.                                                                                                                                           |
    | `108`      | `TOKEN_EXPIRED`                             | Token has expired.                                                                                                                                                                                                                                             | When callback is received, regenerate token and call `login` to log in again.                                                                                   |
    | `109`      | `TOKEN_WILL_EXPIRE`                         | Token passed half of its validity period.                                                                                                                                                                                                                      | When callback is received, regenerate token and call `SDKClient#RenewToken` to update.                                                                          |
    | `200`      | `USER_ALREADY_LOGIN`                        | User already logged in.                                                                                                                                                                                                                                        | Check if SDK has automatic login enabled or if login method was already called.                                                                                 |
    | `201`      | `USER_NOT_LOGIN`                            | Login session invalid or expired when attempting operations.                                                                                                                                                                                                   | Ensure Chat login completes before calling API.                                                                                                                 |
    | `202`      | `USER_AUTHENTICATION_FAILED`                | User authentication fails due to invalid or expired token.                                                                                                                                                                                                     | If logged out, log in again. Otherwise, regenerate token and call `SDKClient#RenewToken`.                                                                       |
    | `203`      | `USER_ALREADY_EXIST`                        | User ID specified during registration already exists.                                                                                                                                                                                                          | Register with a different user ID or consider registration successful.                                                                                          |
    | `204`      | `USER_NOT_FOUND`                            | User does not exist.                                                                                                                                                                                                                                           | Verify user ID parameter is correct.                                                                                                                            |
    | `205`      | `USER_ILLEGAL_ARGUMENT`                     | Incorrect user parameter. User ID invalid or empty during registration or attribute updates.                                                                                                                                                                   | Verify API parameters are correct.                                                                                                                              |
    | `206`      | `USER_LOGIN_ANOTHER_DEVICE`                 | User logged in on another device. Forces logout on current device if multi-device service isn't enabled.                                                                                                                                                       | When `IConnectionDelegate#OnLoggedOtherDevice` is triggered, log in again.                                                                                      |
    | `207`      | `USER_REMOVED`                              | User account deleted in the backend.                                                                                                                                                                                                                           | When `IConnectionDelegate#OnRemovedFromServer` is triggered, return to login page. Account no longer available.                                                 |
    | `208`      | `USER_REG_FAILED`                           | User account registration fails because registration is closed.                                                                                                                                                                                                | Register account with business server instead of using SDK.                                                                                                     |
    | `210`      | `USER_PERMISSION_DENIED`                    | User lacks permission for operation. User on block list attempts to send messageUser tries to modify another user's messageUser tries to modify custom group member attribute set by anotherUser attempts to destroy message thread without proper permissions | Check if user has operational privileges.                                                                                                                       |
    | `213`      | `USER_BIND_ANOTHER_DEVICE`                  | User logged in to another device in single-device login configuration.                                                                                                                                                                                         | Configure for multiple device login or use `SDKClient#KickDevice` before logging in.                                                                            |
    | `214`      | `USER_LOGIN_TOO_MANY_DEVICES`               | User reached maximum number of login devices.                                                                                                                                                                                                                  | Increase allowed simultaneous devices or use `SDKClient#KickDevice` before logging in.                                                                          |
    | `215`      | `USER_MUTED`                                | User is muted in group or chat room.                                                                                                                                                                                                                           | Restrict message sending in UI for users who are banned.                                                                                                        |
    | `216`      | `USER_KICKED_BY_CHANGE_PASSWORD`            | User changed login password, ending current session.                                                                                                                                                                                                           | When `IConnectionDelegate#OnChangedIMPwd` is received, call `SDKClient#Logout` and return to login page.                                                        |
    | `217`      | `USER_KICKED_BY_OTHER_DEVICE`               | User kicked off device via console or API call from another device.                                                                                                                                                                                            | When `IConnectionDelegate#OnKickedByOtherDevice` is received, call `SDKClient#Logout` and return to login page.                                                 |
    | `218`      | `USER_ALREADY_LOGIN_ANOTHER`                | Another user already logged in on device.                                                                                                                                                                                                                      | Call `SDKClient#Logout` to log out current account before logging in with different account.                                                                    |
    | `219`      | `USER_MUTED_BY_ADMIN`                       | User cannot send message when all members are muted.                                                                                                                                                                                                           | Restrict message sending in UI when full ban is active.                                                                                                         |
    | `220`      | `USER_DEVICE_CHANGED`                       | Login attempt on device that isn't the last used device in single-device configuration.                                                                                                                                                                        | When `IConnectionDelegate#OnLoggedOtherDevice` is received, call `Client#Logout` and return to login page.                                                      |
    | `221`      | `USER_NOT_FRIEND`                           | User cannot send message to non-contact when contacts-only messaging is enabled.                                                                                                                                                                               | Call `ContactManager#AddContact` first. Send messages after friend request is accepted.                                                                         |
    | `300`      | `SERVER_NOT_REACHABLE`                      | Server unreachable due to network issues.                                                                                                                                                                                                                      | For login errors, try switching networks or contact support for TLS encryption in specific regions. For other operations, switch networks or retry after delay. |
    | `301`      | `SERVER_TIMEOUT`                            | Request timeout when server doesn't respond within specified period.                                                                                                                                                                                           | Retry API after switching networks or waiting.                                                                                                                  |
    | `302`      | `SERVER_BUSY`                               | Server currently busy.                                                                                                                                                                                                                                         | Check for repeated API calls. May occur when calling again before previous result is returned.                                                                  |
    | `303`      | `SERVER_UNKNOWN_ERROR`                      | Common server request error.                                                                                                                                                                                                                                   | Provide logs and called APIs for troubleshooting.                                                                                                               |
    | `304`      | `SERVER_GET_DNSLIST_FAILED`                 | SDK fails to retrieve DNS server information.                                                                                                                                                                                                                  | If `Options#EnableDNSConfig` is `No`, check server settings. Otherwise, likely network issue during `dnsConfig` request.                                        |
    | `305`      | `SERVER_SERVICE_RESTRICTED`                 | App server is restricted.                                                                                                                                                                                                                                      | Enable Chat feature in console or contact support.                                                                                                              |
    | `400`      | `FILE_NOT_FOUND`                            | File not found.                                                                                                                                                                                                                                                | For log files, retry. For attachments, file no longer exists and cannot be downloaded.                                                                          |
    | `401`      | `FILE_INVALID`                              | File invalid.                                                                                                                                                                                                                                                  | Select different file and retry upload.                                                                                                                         |
    | `402`      | `FILE_UPLOAD_FAILED`                        | Failed to upload file.                                                                                                                                                                                                                                         | Analyze with API calls and logs.                                                                                                                                |
    | `403`      | `FILE_DOWNLOAD_FAILED`                      | Failed to download file.                                                                                                                                                                                                                                       | Check network or message expiration in logs.                                                                                                                    |
    | `404`      | `FILE_DELETE_FAILED`                        | Failed to delete existing log file.                                                                                                                                                                                                                            | Check permissions for app log files.                                                                                                                            |
    | `405`      | `FILE_TOO_LARGE`                            | File exceeds size limit.                                                                                                                                                                                                                                       | Select file under 10 MB or contact support to increase limit.                                                                                                   |
    | `406`      | `FILE_CONTENT_IMPROPER`                     | File content inappropriate.                                                                                                                                                                                                                                    | Select appropriate file and retry.                                                                                                                              |
    | `407`      | `FILE_IS_EXPIRED`                           | File expired. Attachments stored for 7 days by default.                                                                                                                                                                                                        | Contact support to increase storage time.                                                                                                                       |
    | `500`      | `MESSAGE_INVALID`                           | Message invalid. Message body or ID empty, or sender ID inconsistent with login session.                                                                                                                                                                       | Verify message construction, ID, sender, and body settings meet requirements.                                                                                   |
    | `501`      | `MESSAGE_INCLUDE_ILLEGAL_CONTENT`           | Message contains illegal content.                                                                                                                                                                                                                              | View blocking logs in console.                                                                                                                                  |
    | `504`      | `MESSAGE_RECALL_TIME_LIMIT`                 | Message recall timeout.                                                                                                                                                                                                                                        | Show UI error or contact support to extend the retractability time.                                                                                             |
    | `505`      | `SERVICE_NOT_ENABLED`                       | Feature not enabled.                                                                                                                                                                                                                                           | Enable required features in console based on API and log analysis.                                                                                              |
    | `506`      | `MESSAGE_EXPIRED`                           | Group receipt period expired. Default validity is 3 days.                                                                                                                                                                                                      | Show UI error or contact support to extend the validity time.                                                                                                   |
    | `507`      | `MESSAGE_ILLEGAL_WHITELIST`                 | User not on allow list when all members are muted.                                                                                                                                                                                                             | Show UI error or check if group-wide ban is enabled.                                                                                                            |
    | `508`      | `MESSAGE_EXTERNAL_LOGIC_BLOCKED`            | Message blocked by app server filtering rule.                                                                                                                                                                                                                  | Show UI prompt or check the pre-sending callback logs.                                                                                                          |
    | `510`      | `MESSAGE_SIZE_LIMIT`                        | Message body exceeds limit.                                                                                                                                                                                                                                    | Show UI prompt or reduce the message length (max 5 KB by default).                                                                                              |
    | `600`      | `GROUP_INVALID_ID`                          | Group ID is invalid or empty.                                                                                                                                                                                                                                  | Verify group ID parameter isn't empty or disbanded.                                                                                                             |
    | `601`      | `GROUP_ALREADY_JOINED`                      | User already in chat group.                                                                                                                                                                                                                                    | Handle as successful join.                                                                                                                                      |
    | `602`      | `GROUP_NOT_JOINED`                          | User not in chat group.                                                                                                                                                                                                                                        | Verify group ID is for joined group that hasn't been disbanded.                                                                                                 |
    | `603`      | `GROUP_PERMISSION_DENIED`                   | User lacks permission for group operation.                                                                                                                                                                                                                     | Check API call permissions.                                                                                                                                     |
    | `604`      | `GROUP_MEMBERS_FULL`                        | Group member count reached limit.                                                                                                                                                                                                                              | Show UI prompt or check if the maximum member count exceeds limit (default 200).                                                                                |
    | `605`      | `GROUP_NOT_EXIST`                           | Chat group doesn't exist.                                                                                                                                                                                                                                      | Verify `sharedFileId` parameter isn't null.                                                                                                                     |
    | `606`      | `GROUP_NOT_EXIST`                           | Group doesn't exist. Operation attempted on non-existing group.                                                                                                                                                                                                | Verify group ID is correct or not from disbanded group.                                                                                                         |
    | `607`      | `GROUP_DISABLED`                            | Groups are disabled.                                                                                                                                                                                                                                           | Show UI prompt to request unblock from administrator.                                                                                                           |
    | `608`      | `GROUP_NAME_VIOLATION`                      | Group name is invalid.                                                                                                                                                                                                                                         | Check if group name contains sensitive information.                                                                                                             |
    | `609`      | `GROUP_MEMBER_ATTRIBUTES_REACH_LIMIT`       | Custom attributes count reached limit.                                                                                                                                                                                                                         | Total length for single group member cannot exceed 4 KB.                                                                                                        |
    | `610`      | `GROUP_MEMBER_ATTRIBUTES_UPDATE_FAILED`     | Failed to set custom attributes.                                                                                                                                                                                                                               | Analyze with API calls and logs.                                                                                                                                |
    | `611`      | `GROUP_MEMBER_ATTRIBUTES_KEY_REACH_LIMIT`   | Custom attribute key exceeds 16 bytes.                                                                                                                                                                                                                         | Check if attribute key exceeds limit.                                                                                                                           |
    | `612`      | `GROUP_MEMBER_ATTRIBUTES_VALUE_REACH_LIMIT` | Custom attribute value exceeds 512 bytes.                                                                                                                                                                                                                      | Check if attribute value exceeds limit.                                                                                                                         |
    | `613`      | `GROUP_USER_IN_BLOCKLIST`                   | User is in group blacklist.                                                                                                                                                                                                                                    | Show UI prompt or check console for blacklist status.                                                                                                           |
    | `700`      | `CHATROOM_INVALID_ID`                       | Chat room ID is invalid or empty.                                                                                                                                                                                                                              | Check if chat room ID is empty.                                                                                                                                 |
    | `701`      | `CHATROOM_ALREADY_JOINED`                   | User already in chat room.                                                                                                                                                                                                                                     | Handle as successful join.                                                                                                                                      |
    | `702`      | `CHATROOM_NOT_JOINED`                       | User not in chat room.                                                                                                                                                                                                                                         | Verify chat room ID is correct, not disbanded, or previously joined.                                                                                            |
    | `703`      | `CHATROOM_PERMISSION_DENIED`                | User lacks permission for chat room operation.                                                                                                                                                                                                                 | Check API call permissions.                                                                                                                                     |
    | `704`      | `CHATROOM_MEMBERS_FULL`                     | Chat room member count reached limit.                                                                                                                                                                                                                          | Check maximum member count setting.                                                                                                                             |
    | `705`      | `CHATROOM_NOT_EXIST`                        | Chat room doesn't exist.                                                                                                                                                                                                                                       | Verify chat room ID is correct, not disbanded, or previously joined.                                                                                            |
    | `706`      | `CHATROOM_OWNER_NOT_ALLOW_LEAVE`            | Chat room owner not allowed to leave.                                                                                                                                                                                                                          | Check `Options#IsRoomOwnerLeaveAllowed` setting when SDK is initialized.                                                                                        |
    | `707`      | `CHATROOM_USER_IN_BLOCKLIST`                | User is in chat room blacklist.                                                                                                                                                                                                                                | Check console for chat room blacklist status.                                                                                                                   |
    | `900`      | `PUSH_NOT_SUPPORT`                          | Third-party push service not supported on current device.                                                                                                                                                                                                      | Get user attributes in batches of up to 100 users.                                                                                                              |
    | `901`      | `PUSH_BIND_FAILED`                          | Failed to upload third-party push service token to server.                                                                                                                                                                                                     | Check attribute length limits.                                                                                                                                  |
    | `1000`     | `CONTACT_ADD_FAILED`                        | Failed to add contact.                                                                                                                                                                                                                                         | Analyze with API calls and error description.                                                                                                                   |
    | `1001`     | `CONTACT_REACH_LIMIT`                       | Inviter reached maximum contacts limit.                                                                                                                                                                                                                        | Show UI error or contact support to increase limit.                                                                                                             |
    | `1002`     | `CONTACT_REACH_LIMIT_PEER`                  | Invitee reached maximum contacts limit.                                                                                                                                                                                                                        | Show UI error or contact support to increase limit.                                                                                                             |
    | `1100`     | `PRESENCE_PARAM_LENGTH_EXCEED`              | Presence parameter length exceeds limit.                                                                                                                                                                                                                       | Online status details cannot exceed 64 bytes.                                                                                                                   |
    | `1101`     | `PRESENCE_CANNOT_SUBSCRIBE_YOURSELF`        | User cannot subscribe to own status.                                                                                                                                                                                                                           | Check if subscribed user ID is own ID.                                                                                                                          |
    | `1110`     | `TRANSLATE_PARAM_INVALID`                   | Translation parameter error.                                                                                                                                                                                                                                   | Analyze with debug logs.                                                                                                                                        |
    | `1111`     | `TRANSLATE_SERVICE_NOT_ENABLE`              | Translation service not enabled.                                                                                                                                                                                                                               | Enable translation service in console.                                                                                                                          |
    | `1112`     | `TRANSLATE_USAGE_LIMIT`                     | Translation usage reached limit.                                                                                                                                                                                                                               | Contact support to renew translation usage.                                                                                                                     |
    | `1113`     | `TRANSLATE_MESSAGE_FAIL`                    | Failed to translate message.                                                                                                                                                                                                                                   | Analyze with debug logs.                                                                                                                                        |
    | `1200`     | `THIRD_MODERATION_FAILED`                   | Third-party content moderation result is "Reject".                                                                                                                                                                                                             | Check content audit configuration and logs in console.                                                                                                          |
    | `1299`     | `THIRD_DEFAULT_FAILED`                      | Non-third-party moderation service result is "Reject".                                                                                                                                                                                                         | Check content audit configuration and logs in console.                                                                                                          |
    | `1300`     | `REACTION_REACH_LIMIT`                      | Message Reactions reached maximum allowed.                                                                                                                                                                                                                     | Show UI prompt or contact support to increase limit.                                                                                                            |
    | `1301`     | `REACTION_HAS_BEEN_OPERATED`                | User already added this Reaction.                                                                                                                                                                                                                              | Handle as successful addition.                                                                                                                                  |
    | `1302`     | `REACTION_OPERATION_IS_ILLEGAL`             | User lacks permission for Reaction operation.                                                                                                                                                                                                                  | Verify parameters with log analysis.                                                                                                                            |
    | `1400`     | `THREAD_NOT_EXIST`                          | Thread doesn't exist.                                                                                                                                                                                                                                          | Verify subzone ID is correct.                                                                                                                                   |
    | `1401`     | `THREAD_ALREADY_EXIST`                      | Thread already exists under this message ID.                                                                                                                                                                                                                   | Check if subzone already created under incoming message.                                                                                                        |

    
  
      
  
