Error codes
This page lists the error codes returned by the SDK and RESTful APIs. Use these codes to help debug issues when developing applications with the Agora Signaling SDK or RESTful APIs.
RESTful API error codes
When you call the Signaling RESTful API, each response includes the following fields:
errorCode
: The numeric status code returned by the server.reason
: A description of the error associated with the code.
This section describes the meaning of each error code, provides possible causes, and offers suggested solutions.
Error code | Reason | Details | Suggested action |
---|---|---|---|
200 | Success | The request was successful, and messages from history were returned. | No action required. |
400 | Invalid request | The request contains invalid parameters. | Verify and correct the parameters. |
401 | User authentication error. | The request contains invalid authentication parameters. | Verify and use valid parameters. |
403 | Unauthorized or feature not enabled | The App ID is invalid or does not have access to the required features. | - Verify that the App ID is correct. - Confirm that the Signaling service is enabled. - Confirm that the history feature is enabled for the App ID. |
408 | No response from the server. | The request timed out. | |
415 | Unsupported media type | The request body format is not supported. Only JSON is accepted. | Ensure the request body is formatted as JSON. |
435 | Invalid payload | The message payload contains illegal or unsupported content. | Modify the payload and resend the request. |
429 | Rate limit exceeded | The number of requests exceeds the allowed limit. | The quota for the RESTful API is 60 requests per second. Reduce the request rate. |
500 | Internal server error | An unexpected error occurred on the server. | Retry the request. |
503 | Timeout | The request took too long to process. | Retry the request. |
SDK error codes
Refer to the following information for troubleshooting API calls.
ErrorInfo
Properties | Type | Description |
---|---|---|
errorCode | RtmErrorCode | Error code for this operation. |
reason | String | Error reason for this operation. |
operation | String | Operation type. |
To find out the cause of the error and get the corresponding solution, use the errorCode
field with the error codes table.
Error codes table
Refer to the following error codes table to identify and troubleshoot the problem:
Error code | Error description | Cause and solution |
---|---|---|
0 | OK | Correct call |
-10001 | NOT_INITIALIZED | The SDK is not initialized. Please initialize the RtmClient instance by calling the create method before performing other operations. |
-10002 | NOT_LOGIN | The user called the API without logging in to Signaling, disconnected due to timeout, or actively logged out. Please log in to Signaling first. |
-10003 | INVALID_APP_ID | Invalid App ID: - Check that the App ID is correct. - Ensure that Signaling has been activated for the App ID. |
-10005 | INVALID_TOKEN | Invalid Token: - The token is invalid, check whether the Token Provider generates a valid Signaling Token. |
-10006 | INVALID_USER_ID | Invalid User ID: - Check if user ID is empty. - Check if the user ID contains illegal characters. |
-10007 | INIT_SERVICE_FAILED | SDK initialization failed. Please reinitialize by calling the create method. |
-10008 | INVALID_CHANNEL_NAME | Invalid channel name: - Check if the channel name is empty. - Check if the channel name contains illegal characters. |
-10009 | TOKEN_EXPIRED | Token expired. Call renewToken to reacquire the Token. |
-10010 | LOGIN_NO_SERVER_RESOURCES | Server resources are limited. It is recommended to log in again. |
-10011 | LOGIN_TIMEOUT | Login timeout. Check whether the current network is stable and switch to a stable network environment. |
-10012 | LOGIN_REJECTED | SDK login rejected by the server: - Check tha Signaling is activated on your App ID. - Check if the token or userId is banned. |
-10013 | LOGIN_ABORTED | SDK login interrupted due to unknown problem: - Check that the current network is stable and switch to a stable network environment. - The current userId is logged in. |
-10014 | INVALID_PARAMETER | Invalid parameter. Please check if the parameters you provided are correct. |
-10015 | LOGIN_NOT_AUTHORIZED | No RTM service permissions. Check that the console opens Signaling services. |
-10016 | INCONSISTENT_APPID | Inconsistent App ID. Please check whether the App ID used for initialization, login, and joining a channel are consistent. |
-10017 | DUPLICATE_OPERATION | Duplicate operation. |
-10018 | INSTANCE_ALREADY_RELEASED | Repeat rtm instantiation or RTMStreamChannel instantiation. |
-10019 | INVALID_CHANNEL_TYPE | Invalid channel type. The SDK only supports the following channel types. Please use the correct value: - MESSAGE : Message Channel - STREAM : Stream Channel - USER : User Channel |
-10020 | INVALID_ENCRYPTION_PARAMETER | Message encryption parameters are invalid.
|
-10021 | OPERATION_RATE_EXCEED_LIMITATION | Channel metadata or User Metadata -related API call frequency is exceeding the limit. Please control the call frequency within 10/second. |
-10022 | SERVICE_NOT_SUPPORTED | The service type is not supported. Check whether the service type you set in RtmServiceType is correct. This error code is only applicable to the private deployment function. |
-10023 | LOGIN_CANCELED | The login operation has been canceled. Possible reasons are as follows:
|
-10024 | INVALID_PRIVATE_CONFIG | The private deployment parameter settings are invalid. Please check whether the service type and server address you set in RtmPrivateConfig are valid. |
-10025 | NOT_CONNECTED | Not connected to the Signaling server. When you call APIs related to message subscription, metadata, or the Lock module, this error is reported if the Signaling service is not connected. |
-10026 | RENEW_TOKEN_TIMEOUT | Token renewal timed out. |
-11001 | CHANNEL_NOT_JOINED | The user has not joined the channel: - The user is not online, offline or has not joined the channel - Check for typos in userId . |
-11002 | CHANNEL_NOT_SUBSCRIBED | The user has not subscribed to the channel: - The user is not online, offline or has not joined the channel - Check for typos in userId . |
-11003 | CHANNEL_EXCEED_TOPIC_USER_LIMITATION | The number of subscribers to this topic exceeds the limit. |
-11004 | CHANNEL_IN_REUSE | In co-channel mode, RTM released the Stream Channel. |
-11005 | CHANNEL_INSTANCE_EXCEED_LIMITATION | The number of created or subscribed channels exceeds the limit. See API usage limits for details. |
-11006 | CHANNEL_IN_ERROR_STATE | Channel is not available. Please recreate the Stream Channel or resubscribe to the Message Channel. |
-11007 | CHANNEL_JOIN_FAILED | Failed to join this channel: - Check if the number of joined channels exceeds the limit. - Check if the channel name is illegal. - Check if the network is disconnected. |
-11008 | CHANNEL_INVALID_TOPIC_NAME | Invalid topic name: - Check whether the topic name contains illegal characters. - Check if the topic name is empty. |
-11009 | CHANNEL_INVALID_MESSAGE | Invalid message. Check whether the message type is legal, Signaling only supports string , Uint8Array type messages. |
-11010 | CHANNEL_MESSAGE_LENGTH_EXCEED_LIMITATION | Message length exceeded limit. Check if the message payload size exceeds the limit: - Message Channel single message package limit is 32 KB. - Stream Channel single message package limit is 1 KB. |
-11011 | CHANNEL_INVALID_USER_LIST | Invalid user list: - Check if the user list is empty. - Check if the user list contains invalid entries. |
-11012 | CHANNEL_NOT_AVAILABLE | Invalid user list: - Check if the user list is empty - Check if the user list contains illegal items. |
-11013 | CHANNEL_TOPIC_NOT_SUBSCRIBED | The topic is not subscribed. |
-11014 | CHANNEL_EXCEED_TOPIC_LIMITATION | The number of topics exceeds the limit. |
-11015 | CHANNEL_JOIN_TOPIC_FAILED | Failed to join this topic. Check whether the number of added topics exceeds the limit. |
-11016 | CHANNEL_TOPIC_NOT_JOINED | The topic has not been joined. To send a message, you need to join the Topic first. |
-11017 | CHANNEL_TOPIC_NOT_EXIST | The topic does not exist. Check that the topic name is correct. |
-11018 | CHANNEL_INVALID_TOPIC_META | The meta parameters in the topic are invalid. Check if the meta parameter exceeds 256 bytes. |
-11019 | CHANNEL_SUBSCRIBE_TIMEOUT | Channel subscription timed out. Check for broken connections. |
-11020 | CHANNEL_SUBSCRIBE_TOO_FREQUENT | The channel subscription operation is too frequent. Make sure that the subscription operation of the same channel within a 5 seconds interval does not exceed 2 attempts. |
-11021 | CHANNEL_SUBSCRIBE_FAILED | Channel subscription failed. Check if the number of subscribed channels exceeds the limit. |
-11022 | CHANNEL_UNSUBSCRIBE_FAILED | Failed to unsubscribe from the channel. Check if the connection is disconnected. |
-11023 | CHANNEL_ENCRYPT_MESSAGE_FAILED | Message encryption failed: - Check that the cipherKey is valid. - Check that the salt is valid. - Check if encryptionMode mode matches the cipherKey and salt . |
-11024 | CHANNEL_PUBLISH_MESSAGE_FAILED | Message publishing failed. Check for broken connections. |
-11026 | CHANNEL_PUBLISH_MESSAGE_TIMEOUT | Message publishing timed out. Check for broken connections. |
-11027 | CHANNEL_NOT_CONNECTED | The SDK is disconnected from the Signaling server. Please log in again. |
-11028 | CHANNEL_LEAVE_FAILED | Failed to leave the channel. Check for broken connections. |
-11029 | CHANNEL_CUSTOM_TYPE_LENGTH_OVERFLOW | Custom type length overflow. The length of the customType field must to be within 32 characters. |
-11030 | CHANNEL_INVALID_CUSTOM_TYPE | customType field is invalid. Check the customType field for illegal characters. |
-11031 | CHANNEL_UNSUPPORTED_MESSAGE_TYPE | Message type is not supported. |
-11032 | CHANNEL_PRESENCE_NOT_READY | Presence service is not ready. Please rejoin the Stream Channel or resubscribe to the Message Channel. |
-11033 | CHANNEL_RECEIVER_OFFLINE | When sending a user message, the remote user is offline: - Check if the user ID set when calling the method is correct. - Check if the remote user is logged in and online. |
-11034 | CHANNEL_JOIN_CANCELED | The join channel operation has been canceled. After calling the join method, if you call the method again before receiving the call result, the previous call operation will be canceled and the SDK will execute the next call. |
-12001 | STORAGE_OPERATION_FAILED | Storage operation failed. |
-12002 | STORAGE_METADATA_ITEM_EXCEED_LIMITATION | The number of Storage Metadata Items exceeds the limit. |
-12003 | STORAGE_INVALID_METADATA_ITEM | Invalid Metadata Item. |
-12004 | STORAGE_INVALID_ARGUMENT | Invalid argument. |
-12005 | STORAGE_INVALID_REVISION | Invalid Revision parameter. |
-12006 | STORAGE_METADATA_LENGTH_OVERFLOW | Metadata overflows. |
-12007 | STORAGE_INVALID_LOCK_NAME | Invalid Lock name. |
-12008 | STORAGE_LOCK_NOT_ACQUIRED | The Lock was not acquired. |
-12009 | STORAGE_INVALID_KEY | Invalid Metadata key. |
-12010 | STORAGE_INVALID_VALUE | Invalid metadata value. |
-12011 | STORAGE_KEY_LENGTH_OVERFLOW | Metadata key length overflow. |
-12012 | STORAGE_VALUE_LENGTH_OVERFLOW | Metadata value length overflow. |
-12013 | STORAGE_DUPLICATE_KEY | Duplicate Metadata Item key. |
-12014 | STORAGE_OUTDATED_REVISION | Outdated Revision parameter. |
-12015 | STORAGE_NOT_SUBSCRIBE | This channel is not subscribed. |
-12016 | STORAGE_INVALID_METADATA_INSTANCE | Metadata instance does not exist. Please create a Metadata instance. |
-12017 | STORAGE_SUBSCRIBE_USER_EXCEED_LIMITATION | The number of subscribers exceeds the limit. |
-12018 | STORAGE_OPERATION_TIMEOUT | Storage operation timed out. |
-12019 | STORAGE_NOT_AVAILABLE | The Storage service is not available. |
-13001 | PRESENCE_NOT_CONNECTED | The user is not connected to the system. |
-13002 | PRESENCE_NOT_WRITABLE | Presence service is unavailable. |
-13003 | PRESENCE_INVALID_ARGUMENT | Invalid argument. |
-13004 | PRESENCE_CACHED_TOO_MANY_STATES | The temporary user state cached before joining the channel exceeds the limit. See API usage limits for details. |
-13005 | PRESENCE_STATE_COUNT_OVERFLOW | The number of temporary user state key/value pairs exceeds the limit. See API usage limits for details. |
-13006 | PRESENCE_INVALID_STATE_KEY | Invalid state key. |
-13007 | PRESENCE_INVALID_STATE_VALUE | Invalid state value. |
-13008 | PRESENCE_STATE_KEY_SIZE_OVERFLOW | Presence key length overflow. |
-13009 | PRESENCE_STATE_VALUE_SIZE_OVERFLOW | Presence value overflow |
-13010 | PRESENCE_STATE_DUPLICATE_KEY | Repeated state key. |
-13011 | PRESENCE_USER_NOT_EXIST | The user does not exist. |
-13012 | PRESENCE_OPERATION_TIMEOUT | Presence operation timed out. |
-13013 | PRESENCE_OPERATION_FAILED | Presence operation failed. |
-14001 | LOCK_OPERATION_FAILED | Lock operation failed. |
-14002 | LOCK_OPERATION_TIMEOUT | Lock operation timed out. |
-14003 | LOCK_OPERATION_PERFORMING | Lock operation in progress. |
-14004 | LOCK_ALREADY_EXIST | Lock already exists. |
-14005 | LOCK_INVALID_NAME | Invalid Lock name. |
-14006 | LOCK_NOT_ACQUIRED | The Lock was not acquired. |
-14007 | LOCK_ACQUIRE_FAILED | Failed to acquire the Lock. |
-14008 | LOCK_NOT_EXIST | The Lock does not exist. |
-14009 | LOCK_NOT_AVAILABLE | Lock service is not available. |