Status Codes

Update time: 2023/02/08 09:40:42

Status codes

code Description
1 Parameter errors.
2 Multi-media file errors.
3 Image errors.
4 URL errors.
5 Read/write files errors.
6 Invalid token.
7 HTTP request failures.
16 User information is missing because a user did not log in or provide the profile.
14 SQL statement is not executed successfully.
Audio error codes
8 No recording permission.
9 The recording initialization fails.
11 The initialization of playback fails.
Chat room error codes
26 No chat room.

Details for status codes

Wrong user name or password 302

After the client SDK initiates login, return the status code 302. You should check whether the AppKey, accid(account), and token are the same. Reasons: the token is wrong or not the latest: this accid can not be found under AppKey.
See IM login failure-return 302 for details.

Invalid operation or no permission 403

When you execute an invalid operation, the SDK returns status code 403. Common cases:

  • If CommsEase console configures that user A can not send messages to user B who does not add User A to the friend list, the client SDK will return status code 403.
  • In a chat room, to change the role of the administrator to a member, just remove the permission. You can not set the administrator as a member. Otherwise, the SDK will return status code 403.
    In a chat room, only the creator has operation permission over the administrator. But the administrator has no permission over the creator and other administrators. Otherwise, the SDK will return status code 403.
  • 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 a ordinary group 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 Supergroup 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 above 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 a 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, please 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 a ordinary team are acquired, status code 802 is returned. Possible causes:
    • A new member of a 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
  • Status codes
  • Details for status codes
  • Wrong user name or password 302
  • Invalid operation or no permission 403
  • Object cannot be found. 404
  • Client request timeout. 408
  • Parameter error 414
  • Repeated operation 417
  • No permission 802