Skip to main content

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 codeReasonDetailsSuggested action
200SuccessThe request was successful, and messages from history were returned.No action required.
400Invalid requestThe request contains invalid parameters.Verify and correct the parameters.
401User authentication error.The request contains invalid authentication parameters.Verify and use valid parameters.
403Unauthorized or feature not enabledThe 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.
408No response from the server.The request timed out.
415Unsupported media typeThe request body format is not supported. Only JSON is accepted.Ensure the request body is formatted as JSON.
435Invalid payloadThe message payload contains illegal or unsupported content.Modify the payload and resend the request.
429Rate limit exceededThe number of requests exceeds the allowed limit.The quota for the RESTful API is 60 requests per second. Reduce the request rate.
500Internal server errorAn unexpected error occurred on the server.Retry the request.
503TimeoutThe request took too long to process.Retry the request.

SDK error codes

Refer to the following information for troubleshooting API calls.

ErrorInfo

PropertiesTypeDescription
errorCodeRtmErrorCodeError code for this operation.
reasonStringError reason for this operation.
operationStringOperation 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 codeError descriptionCause and solution
0OKCorrect call
-10001NOT_INITIALIZEDThe SDK is not initialized. Please initialize the RtmClient instance by calling the create method before performing other operations.
-10002NOT_LOGINThe user called the API without logging in to Signaling, disconnected due to timeout, or actively logged out. Please log in to Signaling first.
-10003INVALID_APP_IDInvalid App ID:
- Check that the App ID is correct.
- Ensure that Signaling has been activated for the App ID.
-10005INVALID_TOKENInvalid Token:
- The token is invalid, check whether the Token Provider generates a valid Signaling Token.
-10006INVALID_USER_IDInvalid User ID:
- Check if user ID is empty.
- Check if the user ID contains illegal characters.
-10007INIT_SERVICE_FAILEDSDK initialization failed. Please reinitialize by calling the create method.
-10008INVALID_CHANNEL_NAMEInvalid channel name:
- Check if the channel name is empty.
- Check if the channel name contains illegal characters.
-10009TOKEN_EXPIREDToken expired. Call renewToken to reacquire the Token.
-10010LOGIN_NO_SERVER_RESOURCESServer resources are limited. It is recommended to log in again.
-10011LOGIN_TIMEOUTLogin timeout. Check whether the current network is stable and switch to a stable network environment.
-10012LOGIN_REJECTEDSDK login rejected by the server:
- Check tha Signaling is activated on your App ID.
- Check if the token or userId is banned.
-10013LOGIN_ABORTEDSDK 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.
-10014INVALID_PARAMETERInvalid parameter. Please check if the parameters you provided are correct.
-10015LOGIN_NOT_AUTHORIZEDNo RTM service permissions. Check that the console opens Signaling services.
-10016INCONSISTENT_APPIDInconsistent App ID. Please check whether the App ID used for initialization, login, and joining a channel are consistent.
-10017DUPLICATE_OPERATIONDuplicate operation.
-10018INSTANCE_ALREADY_RELEASEDRepeat rtm instantiation or RTMStreamChannel instantiation.
-10019INVALID_CHANNEL_TYPEInvalid channel type. The SDK only supports the following channel types. Please use the correct value:
- MESSAGE: Message Channel
- STREAM: Stream Channel
- USER: User Channel
-10020INVALID_ENCRYPTION_PARAMETERMessage encryption parameters are invalid.
  • Check that the encryption key generated is a String.
  • Check that the generated encryption salt is Uint8Array type and that the length is 32 bytes.
  • Check that the encryption method matches the encryption key and the encryption salt.
-10021OPERATION_RATE_EXCEED_LIMITATIONChannel metadata or User Metadata -related API call frequency is exceeding the limit. Please control the call frequency within 10/second.
-10022SERVICE_NOT_SUPPORTEDThe 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.
-10023LOGIN_CANCELEDThe login operation has been canceled. Possible reasons are as follows:
  • After calling the login 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.
  • Calling the logout method to log out before successfully logging in.
-10024INVALID_PRIVATE_CONFIGThe private deployment parameter settings are invalid. Please check whether the service type and server address you set in RtmPrivateConfig are valid.
-10025NOT_CONNECTEDNot 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.
-10026RENEW_TOKEN_TIMEOUTToken renewal timed out.
-11001CHANNEL_NOT_JOINEDThe user has not joined the channel:
- The user is not online, offline or has not joined the channel
- Check for typos in userId.
-11002CHANNEL_NOT_SUBSCRIBEDThe user has not subscribed to the channel:
- The user is not online, offline or has not joined the channel
- Check for typos in userId.
-11003CHANNEL_EXCEED_TOPIC_USER_LIMITATIONThe number of subscribers to this topic exceeds the limit.
-11004CHANNEL_IN_REUSEIn co-channel mode, RTM released the Stream Channel.
-11005CHANNEL_INSTANCE_EXCEED_LIMITATIONThe number of created or subscribed channels exceeds the limit. See API usage limits for details.
-11006CHANNEL_IN_ERROR_STATEChannel is not available. Please recreate the Stream Channel or resubscribe to the Message Channel.
-11007CHANNEL_JOIN_FAILEDFailed 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.
-11008CHANNEL_INVALID_TOPIC_NAMEInvalid topic name:
- Check whether the topic name contains illegal characters.
- Check if the topic name is empty.
-11009CHANNEL_INVALID_MESSAGEInvalid message. Check whether the message type is legal, Signaling only supports string, Uint8Array type messages.
-11010CHANNEL_MESSAGE_LENGTH_EXCEED_LIMITATIONMessage 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.
-11011CHANNEL_INVALID_USER_LISTInvalid user list:
- Check if the user list is empty.
- Check if the user list contains invalid entries.
-11012CHANNEL_NOT_AVAILABLEInvalid user list:
- Check if the user list is empty
- Check if the user list contains illegal items.
-11013CHANNEL_TOPIC_NOT_SUBSCRIBEDThe topic is not subscribed.
-11014CHANNEL_EXCEED_TOPIC_LIMITATIONThe number of topics exceeds the limit.
-11015CHANNEL_JOIN_TOPIC_FAILEDFailed to join this topic. Check whether the number of added topics exceeds the limit.
-11016CHANNEL_TOPIC_NOT_JOINEDThe topic has not been joined. To send a message, you need to join the Topic first.
-11017CHANNEL_TOPIC_NOT_EXISTThe topic does not exist. Check that the topic name is correct.
-11018CHANNEL_INVALID_TOPIC_METAThe meta parameters in the topic are invalid. Check if the meta parameter exceeds 256 bytes.
-11019CHANNEL_SUBSCRIBE_TIMEOUTChannel subscription timed out. Check for broken connections.
-11020CHANNEL_SUBSCRIBE_TOO_FREQUENTThe 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.
-11021CHANNEL_SUBSCRIBE_FAILEDChannel subscription failed. Check if the number of subscribed channels exceeds the limit.
-11022CHANNEL_UNSUBSCRIBE_FAILEDFailed to unsubscribe from the channel. Check if the connection is disconnected.
-11023CHANNEL_ENCRYPT_MESSAGE_FAILEDMessage encryption failed:
- Check that the cipherKey is valid.
- Check that the salt is valid.
- Check if encryptionMode mode matches the cipherKey and salt.
-11024CHANNEL_PUBLISH_MESSAGE_FAILEDMessage publishing failed. Check for broken connections.
-11026CHANNEL_PUBLISH_MESSAGE_TIMEOUTMessage publishing timed out. Check for broken connections.
-11027CHANNEL_NOT_CONNECTEDThe SDK is disconnected from the Signaling server. Please log in again.
-11028CHANNEL_LEAVE_FAILEDFailed to leave the channel. Check for broken connections.
-11029CHANNEL_CUSTOM_TYPE_LENGTH_OVERFLOWCustom type length overflow. The length of the customType field must to be within 32 characters.
-11030CHANNEL_INVALID_CUSTOM_TYPEcustomType field is invalid. Check the customType field for illegal characters.
-11031CHANNEL_UNSUPPORTED_MESSAGE_TYPEMessage type is not supported.
-11032CHANNEL_PRESENCE_NOT_READYPresence service is not ready. Please rejoin the Stream Channel or resubscribe to the Message Channel.
-11033CHANNEL_RECEIVER_OFFLINEWhen 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.
-11034CHANNEL_JOIN_CANCELEDThe 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.
-12001STORAGE_OPERATION_FAILEDStorage operation failed.
-12002STORAGE_METADATA_ITEM_EXCEED_LIMITATIONThe number of Storage Metadata Items exceeds the limit.
-12003STORAGE_INVALID_METADATA_ITEMInvalid Metadata Item.
-12004STORAGE_INVALID_ARGUMENTInvalid argument.
-12005STORAGE_INVALID_REVISIONInvalid Revision parameter.
-12006STORAGE_METADATA_LENGTH_OVERFLOWMetadata overflows.
-12007STORAGE_INVALID_LOCK_NAMEInvalid Lock name.
-12008STORAGE_LOCK_NOT_ACQUIREDThe Lock was not acquired.
-12009STORAGE_INVALID_KEYInvalid Metadata key.
-12010STORAGE_INVALID_VALUEInvalid metadata value.
-12011STORAGE_KEY_LENGTH_OVERFLOWMetadata key length overflow.
-12012STORAGE_VALUE_LENGTH_OVERFLOWMetadata value length overflow.
-12013STORAGE_DUPLICATE_KEYDuplicate Metadata Item key.
-12014STORAGE_OUTDATED_REVISIONOutdated Revision parameter.
-12015STORAGE_NOT_SUBSCRIBEThis channel is not subscribed.
-12016STORAGE_INVALID_METADATA_INSTANCEMetadata instance does not exist. Please create a Metadata instance.
-12017STORAGE_SUBSCRIBE_USER_EXCEED_LIMITATIONThe number of subscribers exceeds the limit.
-12018STORAGE_OPERATION_TIMEOUTStorage operation timed out.
-12019STORAGE_NOT_AVAILABLEThe Storage service is not available.
-13001PRESENCE_NOT_CONNECTEDThe user is not connected to the system.
-13002PRESENCE_NOT_WRITABLEPresence service is unavailable.
-13003PRESENCE_INVALID_ARGUMENTInvalid argument.
-13004PRESENCE_CACHED_TOO_MANY_STATESThe temporary user state cached before joining the channel exceeds the limit. See API usage limits for details.
-13005PRESENCE_STATE_COUNT_OVERFLOWThe number of temporary user state key/value pairs exceeds the limit. See API usage limits for details.
-13006PRESENCE_INVALID_STATE_KEYInvalid state key.
-13007PRESENCE_INVALID_STATE_VALUEInvalid state value.
-13008PRESENCE_STATE_KEY_SIZE_OVERFLOWPresence key length overflow.
-13009PRESENCE_STATE_VALUE_SIZE_OVERFLOWPresence value overflow
-13010PRESENCE_STATE_DUPLICATE_KEYRepeated state key.
-13011PRESENCE_USER_NOT_EXISTThe user does not exist.
-13012PRESENCE_OPERATION_TIMEOUTPresence operation timed out.
-13013PRESENCE_OPERATION_FAILEDPresence operation failed.
-14001LOCK_OPERATION_FAILEDLock operation failed.
-14002LOCK_OPERATION_TIMEOUTLock operation timed out.
-14003LOCK_OPERATION_PERFORMINGLock operation in progress.
-14004LOCK_ALREADY_EXISTLock already exists.
-14005LOCK_INVALID_NAMEInvalid Lock name.
-14006LOCK_NOT_ACQUIREDThe Lock was not acquired.
-14007LOCK_ACQUIRE_FAILEDFailed to acquire the Lock.
-14008LOCK_NOT_EXISTThe Lock does not exist.
-14009LOCK_NOT_AVAILABLELock service is not available.