Status codes

Update time: 2023/09/27 07:25:31

Web status codes

code Description
Server_Not_Available Socket server is not available.
Error_Internet_Disconnected Internet is disconnected.
Error_Connection_is_not_Established The connection is not established.
Error_Timeout Timeout
Param_Error Error parameter
No_File_Selected Please select file.
Wrong_File_Type Wrong file type
File_Too_Large Too large file
Cross_Origin_Iframe The cross-domain Iframe content cannot be acquired.
Error_Unknown Unknown error

Details for status codes

Wrong user name or password 302

When client SDK executes login and calls status code 302, you shall check whether current AppKey and accid(account) correspond to token. The common causes include "the token is wrong or not the latest", "this accid cannot be found under AppKey".
See About failed IM login-return 302 for details.

Invalid operation or no permissions 403

When illegal operation is executed, status code 403 will be returned. Common illegal operations include:

  • If CommsEase console configures that non-friend cannot send message, status code 403 will be returned when client SDK sends message to non-friend.
  • In chat room service, the administrator can be changed to common user using canceling his permission. The manager cannot be set as ordinary member, otherwise, status code 403 may be returned.
    In chat room service, only the creator can change manager, but the administrator cannot change creator and other administrators. Otherwise, status code 403 may be returned.
  • In a third-party callback, a certain message is not allowed by the third-party callback. In this case, the sender SDK will return 403.
    If a user is blocklisted, a third-party callback is required before sending a message. If it is not allowed, the SDK will return 403; otherwise, the SDK will return 7101.
  • If a user has exited or been removed from a team, when a user tries to revoke team messages, status code 403 will be returned. In the revoking duration, The administrator can revoke messages sent by other members who are removed from an ordinary team from a client.
  • If the AppKey corresponding to the specific CommsEase App is disabled, {"desc": "app is forbidden", "code": 403} will be returned when calling the IM server API.
  • When calling IM server API, if information such as nickname and signature are not allowed by the anti-spam feature(politics, prohibition, ads), the SDK will return {"desc": "forbbiden info", "code": 403}.
  • In the function of uploading file transcoding under interactive whiteboard service, file-related information can be queried by the uploader only; otherwise, 403 will be returned.
  • IM server API team-related API applies to advanced team and SuperTeam only, instead of common team/discussion team. The operation for common team/discussion team can be made with client SDK API. Otherwise, {"desc": "no support", "code":403} will be returned.
  • If user A is not in the friend list of user B, the SDK will return 403 when calling APIs of updating friend information.

If a feature is not enabled, the SDK will also return status code 403 when calling the corresponding API. Common cases:

  • If event subscription (commonly used for online event subscription) is not opened, 403 will be returned when related functions are used.
  • If the console shows your app has no messaging permissions, the SDK will return 403 when calling The API of sending messages. For more information, contact our sales consultant.
  • If you do not enable the feature of roaming messages for your app, the SDK will return 403 when calling related APIs to delete roaming messages.

Object cannot be found. 404

If status code 404 returns when calling APIs, check whether the required parameter is correct. Common cases:

  • When the required parameter is void, status code 404 may be called.
  • The typed parameter cannot be found actually. For example, unregistered accid or unreal team ID is typed.

Client request timeout. 408

Status code 408 will be returned when calling APIs, check whether the current network is ordinary. Common cases:

  • When the networking request API is called after a network disconnection, 408 will be returned.
  • If the client does not log in to an app, call The API to request a network connection.
  • SDK for Android 4.3.0 and earlier versions do not apply to Android 8.0 and later system. In some cases, the status code 408 is returned. So, use the latest version of SDK.

Parameter error 414

If status code 414 is returned when calling APIs, check whether the passed parameter is correct. Common cases:

  • The data type of passed parameter is not consistent with The API requirement.
  • If Perform security verification of identity: If the identity of the client App requesting login is not in the above list, reject the login request is selected in Console> Applications> App Key Management> Identity Management, when client App token (iOS Bundle Identifier / Android Package Name) is not in the configuration list, status code 414 will be returned with login API.
  • When a server API is called and an unregistered accid is passed, status code 414 will also be returned.
  • If a chat room is closed, status code 414 will be returned when querying historical messages in a chat room. For example, {"desc": "check roomid", "code": 414} will be returned when IM server API "Query chat room cloud message history" is called.
  • If the message is filtered by anti-spam, error code 414 will be returned when the SDK tries to revoke the message.
  • It is possible to add the user himself as friend, otherwise, status code 414 will be returned.
  • When a message-related API is called, if the parameter typed by the developer is not consistent with JSON format, {"code": 414, "msg": "'mobiles' / 'params' should be json format"} will be returned. Please correct.
  • In SDK for Web, "teamMsgReceipts" parameter under the team message receipt function is in an array format and the maximum number of elements is 50. If the limit is exceeded, error code 414 will be returned.
  • {"desc":"bad http headers", "code":414} will be returned when calling the IM server API. The status code occurs if the verification information is wrong. For verification information, see Click here for details.
    [Note] CheckSum is calculated with AppSecret rather than AppKey.
  • Returning {"desc": "CurTime is illegal", "code": 414}/{"desc": "CurTime is expired", "code": 414} means that the typed CurTime parameter is not consistent with current UTC timestamp (leading or lagging). Possible causes include:
    • The developer did not dynamically acquire current UTC timestamp in real time.
    • The time zone and time configured for app server are not consistent with actual conditions.
  • {"desc":"body not json", "code":414} is returned. The request Content-Type with IM server API is application/x-www-form-urlencoded. Please execute urlencode for parameter value to avoid resolution failures due to special characters.
  • {"desc":"retry again", "code":414} is returned. When Create CommsEase IM Account is called to create an account, this error may be returned if the same accid parameter is typed for different requests.
  • When an ordinary team is created, import at least two member accounts. Otherwise, error code 414 will be returned.
  • If the account of an team owner is banned, {"desc": "check accid001", "code": 414} will be returned when the server API is called to dismiss a team.
  • {"desc":"parameter roomid should be long","code":414} is returned when calling APIs related to a chat room. Possible causes:
    • Developers fail to encode roomid parameters. For example, executing json_encode in PHP may result in this error.
  • For "Update chat room information", if only roomid, needNotify and notifyExt are typed, instead of any other parameters requiring update, then {"desc": "no valid param provided, skip update!", "code": 414} will be returned.
  • When Create CommsEase IM Account is called, {"desc": "Exceed the maximum account XXX", "code":414} will be returned. Possible causes include:
    • The limit of IM free accounts is 100.
    • IM Pro version (trial) is expired. There is no limit for accounts of IM Pro version during the trial. The limit is declined to 100 after trial. If you want to use IM Pro version again, contact our sales consultant to intergrate the official version.

Repeated operation 417

No permission 802

  • When IM SDK "actively leave team" API is called, status code 802 will be returned. The owner of an advanced team can not leave a team. But the owner can leave the team after transferring the team or dismiss the team.
  • When members of an ordinary team are acquired, status code 802 is returned. Possible causes:
    • A new member of an ordinary team is not activated. After receiving team messages, the new member is activated and then can call The API of acquiring new members.
  • When Mute all users in a team API is called to mute and unmute all users in a team, if muteType is typed with 3, all members including the creator in a team is muted.In this case, if the SDK or client tries to call The API again, status code 802 will be returned.
Was this page helpful?
Yes
No
  • Web status codes
  • Details for status codes
  • Wrong user name or password 302
  • Invalid operation or no permissions 403
  • Object cannot be found. 404
  • Client request timeout. 408
  • Parameter error 414
  • Repeated operation 417
  • No permission 802