Error Codes

Error code will be json object of { error_code:error_message }

Common errors

Code Message
100 Please check your Internet connection
101 Connection error
102 User has not logged-in
103 JSON Parsing error
104 Initial settings error
105 User has already logged-out
    Possible reason:
  1. The chatlogin() and getUserId() functions of integration.php are not returning same value.
  2. The getUserId() function is not configured to accept values from mobileapp.
106 The file does not exist at given path
107 CometChat is not installed at specified url
108 Please configure Translate Conversation module on CometChat admin panel

Login error

Code Message
200 Incorrect userID (server returns 0 for login with userID)
201 Invalid User (Server has returned empty response)
202 Invalid URL or response for login is incorrect
    Possible reason:
  1. chatlogin() function of integration.php is not configured
203 Sorry, CometChat needs to be upgraded on the site to use this SDK.
    Possible reason:
  1. An old version of CometChat detected, version must be 5.4+, also there may be issue like some html/php warnings, echo,404 page is getting mix with the login response
204 Incorrect username and password (server returns 0 for login with username and password)
205 Unable to connect to domain. Please contact us at [email protected] for more information.
    Possible reason:
  1. Subscription has expired.

One-on-One Error

Code Message
300 An error occurred while blocking user
    Possible reason:
  1. Server returns 0 , either user is already blocked or server error
301 An error occurred while unblocking user
    Possible reason:
  1. Server returns 0 , either user is not blocked or server error

Chatroom error

Code Message
400 User has not joined any chatroom
401 Cannot create chatoom. Chatroom with the same name exists.
402 Please enter correct password for chatroom
    Possible reason:
  1. Incorrect password provided while joining password protected chatroom
403 You are banned from this chatroom
404 User has been banned from given chatroom
405 This chatroom does not exist
406 You do not have the privileges(owner,moderator & admin) to delete this chatroom. OR This chatroom doesn’t exists.

AVChat error

Code Message
500 Audio/Video Chat plugin not enabled.(You have to enable the Audio Video Chat plugin from your CometChat admin panel.)
501 No Call Details found.
    Possible reasons:
  1. In case of group conference you are calling startConference() function before join or sendRequest
  2. In case of Audio/Video Chat this error will occur when you call startAVChatCall() function before sending call request or accepting call request, or trying to reject, cancel the call even if there is no call
502 User provided for Audio/Video Chat call is incorrect
503 Local media unavailable
504 Audio/Video Chat call could not connect
505 This device does not support Audio/Video Chat feature
506 User is already busy in a call
507 Container view provided for Audio/Video Chat is nil

Not finding what you need?

The CometChat team is here to help!