Skip to main content
export enum ErrorCode {
NONE = 0,
// AppKey is missing
APP_KEY_EMPTY = 11001,
// Token is missing
TOKEN_EMPTY = 11002,
// AppKey does not exist
APP_KEY_INVALID = 11003,
// Token is invalid
TOKEN_ILLEGAL = 11004,
// Token is unauthorized
TOKEN_UNAUTHORIZED = 11005,
// Token has expired
TOKEN_EXPIRED = 11006,
// application is banned
APP_PROHIBITED = 11009,
// user is banned
USER_PROHIBITED = 11010,
// user was forced offline
USER_KICKED_BY_OTHER_CLIENT = 11011,
// user logged out
USER_LOG_OUT = 11012,

// users are not friends
NOT_FRIEND = 12009,
// operation is not permitted
NO_OPERATION_PERMISSION = 12010,
// message does not exist
REMOTE_MESSAGE_NOT_EXIST = 12011,
// message is already in favorites
ADD_DUPLICATE_FAVORITE_MESSAGE = 12012,

// group does not exist
GROUP_NOT_EXIST = 13001,
// user is not a group member
NOT_GROUP_MEMBER = 13002,

// default chatroom error
CHATROOM_UNKNOWN_ERROR = 14000,
// user is not a chatroom member
NOT_CHATROOM_MEMBER = 14001,
// chatroom attributes are full (maximum 100)
CHATROOM_ATTRIBUTES_COUNT_EXCEED = 14002,
// not authorized to modify the chatroom attribute (the key was not set by the current user)
CHATROOM_KEY_UNAUTHORIZED = 14003,
// chatroom attribute does not exist
CHATROOM_ATTRIBUTE_NOT_EXIST = 14004,
// chatroom does not exist
CHATROOM_NOT_EXIST = 14005,
// chatroom has been destroyed
CHATROOM_DESTROYED = 14006,

INVALID_PARAM = 21003,
OPERATION_TIMEOUT = 21004,
CONNECTION_UNAVAILABLE = 21005,
SERVER_SET_ERROR = 21006,
CONNECTION_ALREADY_EXIST = 21007,

MESSAGE_NOT_EXIST = 22001,
MESSAGE_ALREADY_RECALLED = 22002,
MESSAGE_UPLOAD_ERROR = 22003,
// not a media message
MESSAGE_DOWNLOAD_ERROR_NOT_MEDIA_MESSAGE = 23001,
// media-message URL is empty
MESSAGE_DOWNLOAD_ERROR_URL_EMPTY = 23002,
// appKey or userId is null
MESSAGE_DOWNLOAD_ERROR_APP_KEY_OR_USERID_EMPTY = 23004,
MESSAGE_DOWNLOAD_ERROR_SAVE_PATH_EMPTY = 23005,
MESSAGE_DOWNLOAD_ERROR = 23006,
FILE_SAVED_FAILED = 23007,
// failed to set chatroom attributes in a batch
CHATROOM_BATCH_SET_ATTRIBUTE_FAIL = 24001
}