Skip to content

Status Code

There are two status codes that developers need to understand, one is ResponseStatusCode, and the other is SessionCloseStatus. The content in the following table does not need to be memorized deliberately. You only need to know how to query when encountering an unfamiliar status code.

ResponseStatusCode

ResponseStatusCode indicates the processing status in the request response, similar to the HTTP status code.

Each request response will contain a ResponseStatusCode. For the specific status code declaration, please refer to the im.turms.client.model.ResponseStatusCode class under the turms-client-kotlin project.

Client unique status code

The client-specific status code will not appear in the Turms server, indicating that the client request is rejected locally on the client.

CategoryNameStatus CodeMeaning
Connection relatedCONNECT_TIMEOUT1
Request relatedINVALID_REQUEST100
CLIENT_REQUESTS_TOO_FREQUENT101
REQUEST_TIMEOUT102
ILLEGAL_ARGUMENT103
Notification RelatedINVALID_NOTIFICATION200
INVALID_RESPONSE201
Session relatedCLIENT_SESSION_ALREADY_ESTABLISHED300
CLIENT_SESSION_HAS_BEEN_CLOSED301
Message relatedMESSAGE_IS_REJECTED400
Storage relatedQUERY_PROFILE_URL_TO_UPDATE_BEFORE_LOGIN500

Common Status Codes

CategoryNameStatus CodeMeaning
Successful ResponseOK1000
NO_CONTENT1001
ALREADY_UP_TO_DATE1002
Client Request ErrorINVALID_REQUEST1100
CLIENT_REQUESTS_TOO_FREQUENT1101
ILLEGAL_ARGUMENT1102
RECORD_CONTAINS_DUPLICATE_KEY1103
REQUESTED_RECORDS_TOO_MANY1104
SEND_REQUEST_FROM_NONEXISTENT_SESSION1105
UNAUTHORIZED_REQUEST1106
Server ErrorSERVER_INTERNAL_ERROR1200
SERVER_UNAVAILABLE1201
Admin - Common ErrorUNAUTHORIZED1300
NO_FILTER_FOR_DELETE_OPERATION1301
RESOURCE_NOT_FOUND1302
DUPLICATE_RESOURCE1303
ADMIN_REQUESTS_TOO_FREQUENT1304
Admin - JFR Related ErrorDUMP_JFR_IN_ILLEGAL_STATUS1310
Admin - Plugin Related ErrorJAVASCRIPT_PLUGIN_IS_DISABLED1320
SAVING_JAVA_PLUGIN_IS_DISABLED1321
SAVING_JAVASCRIPT_PLUGIN_IS_DISABLED1322
Admin - Blocklist Related ErrorIP_BLOCKLIST_IS_DISABLED1400
USER_ID_BLOCKLIST_IS_DISABLED1401
Admin - Cluster - Leader Related ErrorNONEXISTENT_MEMBER_TO_BE_LEADER1800
NO_QUALIFIED_MEMBER_TO_BE_LEADER1801
NOT_QUALIFIED_MEMBER_TO_BE_LEADER1802
User - Login Related ErrorUNSUPPORTED_CLIENT_VERSION2000
LOGIN_TIMEOUT2010
LOGIN_AUTHENTICATION_FAILED2011
LOGGING_IN_USER_NOT_ACTIVE2012
LOGIN_FROM_FORBIDDEN_DEVICE_TYPE2013
User - Session Related ErrorSESSION_SIMULTANEOUS_CONFLICTS_DECLINE2100
SESSION_SIMULTANEOUS_CONFLICTS_NOTIFY2101
SESSION_SIMULTANEOUS_CONFLICTS_OFFLINE2102
CREATE_EXISTING_SESSION2103
UPDATE_HEARTBEAT_OF_NONEXISTENT_SESSION2104
User - Location Related ErrorUSER_LOCATION_RELATED_FEATURES_ARE_DISABLED2200
QUERYING_NEAREST_USERS_BY_SESSION_ID_IS_DISABLED2201
User - Info Related ErrorUPDATE_INFO_OF_NONEXISTENT_USER2300
NOT_FRIEND_TO_QUERY_USER_PROFILE2301
BLOCKED_USER_TO_QUERY_USER_PROFILE2302
User - Permission Related ErrorQUERY_PERMISSION_OF_NONEXISTENT_USER2400
User - Relationship Related ErrorADD_NON_RELATED_USER_TO_GROUP2500
CREATE_EXISTING_RELATIONSHIP2501
CANNOT_BLOCK_ONESELF2502
User - Friend Request Related ErrorCREATE_EXISTING_FRIEND_REQUEST2600
BLOCKED_USER_TO_SEND_FRIEND_REQUEST2601
RECALL_NON_PENDING_FRIEND_REQUEST2602
RECALLING_FRIEND_REQUEST_IS_DISABLED2603
NOT_SENDER_TO_RECALL_FRIEND_REQUEST2604
UPDATE_NON_PENDING_FRIEND_REQUEST2605
NOT_RECIPIENT_TO_UPDATE_FRIEND_REQUEST2606
Group - Info Related ErrorUPDATE_INFO_OF_NONEXISTENT_GROUP3000
NOT_GROUP_OWNER_TO_UPDATE_GROUP_INFO3001
NOT_GROUP_OWNER_OR_MANAGER_TO_UPDATE_GROUP_INFO3002
NOT_GROUP_MEMBER_TO_UPDATE_GROUP_INFO3003
Group - Type Related ErrorNO_PERMISSION_TO_CREATE_GROUP_WITH_GROUP_TYPE3100
CREATE_GROUP_WITH_NONEXISTENT_GROUP_TYPE3101
UPDATING_GROUP_TYPE_IS_DISABLED3102
NOT_GROUP_OWNER_TO_UPDATE_GROUP_TYPE3103
NO_PERMISSION_TO_UPDATE_GROUP_TO_GROUP_TYPE3104
UPDATE_GROUP_TO_NONEXISTENT_GROUP_TYPE3105
Group - Ownership Related ErrorNOT_ACTIVE_USER_TO_CREATE_GROUP3200
NOT_GROUP_OWNER_TO_TRANSFER_GROUP3201
NOT_GROUP_OWNER_TO_DELETE_GROUP3202
GROUP_SUCCESSOR_NOT_GROUP_MEMBER3203
GROUP_OWNER_QUIT_WITHOUT_SPECIFYING_SUCCESSOR3204
MAX_OWNED_GROUPS_REACHED3205
TRANSFER_NONEXISTENT_GROUP3206
Group - Question Related ErrorNOT_GROUP_OWNER_OR_MANAGER_TO_CREATE_GROUP_QUESTION3300
NOT_GROUP_OWNER_OR_MANAGER_TO_DELETE_GROUP_QUESTION3301
NOT_GROUP_OWNER_OR_MANAGER_TO_UPDATE_GROUP_QUESTION3302
NOT_GROUP_OWNER_OR_MANAGER_TO_QUERY_GROUP_QUESTION_ANSWER3303
CREATE_GROUP_QUESTION_FOR_INACTIVE_GROUP3304
CREATE_GROUP_QUESTION_FOR_GROUP_USING_JOIN_REQUEST3305
CREATE_GROUP_QUESTION_FOR_GROUP_USING_INVITATION3306
CREATE_GROUP_QUESTION_FOR_GROUP_USING_MEMBERSHIP_REQUEST3307
GROUP_QUESTION_ANSWERER_HAS_BEEN_BLOCKED3308
GROUP_MEMBER_ANSWER_GROUP_QUESTION3309
ANSWER_INACTIVE_GROUP_QUESTION3310
ANSWER_GROUP_QUESTION_OF_INACTIVE_GROUP3311
Group - Member Related ErrorADD_USER_TO_GROUP_REQUIRING_USERS_APPROVAL3400
ADD_USER_TO_INACTIVE_GROUP3401
NOT_GROUP_OWNER_TO_ADD_GROUP_MANAGER3402
ADD_USER_TO_GROUP_WITH_SIZE_LIMIT_REACHED3403
ADD_BLOCKED_USER_TO_GROUP3404
NOT_GROUP_OWNER_TO_ADD_GROUP_MEMBER3405
NOT_GROUP_OWNER_OR_MANAGER_TO_ADD_GROUP_MEMBER3406
NOT_GROUP_MEMBER_TO_ADD_GROUP_MEMBER3407
NOT_GROUP_OWNER_OR_MANAGER_TO_REMOVE_GROUP_MEMBER3408
NOT_GROUP_OWNER_TO_REMOVE_GROUP_OWNER_OR_MANAGER3409
NOT_GROUP_OWNER_TO_UPDATE_GROUP_MEMBER_ROLE3410
UPDATE_GROUP_MEMBER_ROLE_OF_NONEXISTENT_GROUP3411
NOT_GROUP_OWNER_TO_UPDATE_GROUP_MEMBER_INFO3412
NOT_GROUP_OWNER_OR_MANAGER_TO_UPDATE_GROUP_MEMBER_INFO3413
NOT_GROUP_MEMBER_TO_UPDATE_GROUP_MEMBER_INFO3414
UPDATE_GROUP_MEMBER_INFO_OF_NONEXISTENT_GROUP3415
UPDATE_INFO_OF_NONEXISTENT_GROUP_MEMBER3416
NOT_GROUP_OWNER_OR_MANAGER_TO_MUTE_GROUP_MEMBER3417
MUTE_GROUP_MEMBER_WITH_ROLE_EQUAL_TO_OR_HIGHER_THAN_REQUESTER3418
MUTE_GROUP_MEMBER_OF_NONEXISTENT_GROUP3419
MUTE_NONEXISTENT_GROUP_MEMBER3420
NOT_GROUP_MEMBER_TO_QUERY_GROUP_MEMBER_INFO3421
USER_JOIN_GROUP_WITHOUT_ACCEPTING_GROUP_INVITATION3422
USER_JOIN_GROUP_WITHOUT_ANSWERING_GROUP_QUESTION3423
USER_JOIN_GROUP_WITHOUT_SENDING_GROUP_JOIN_REQUEST3424
Group - Blocklist Related ErrorNOT_GROUP_OWNER_OR_MANAGER_TO_ADD_BLOCKED_USER3500
NOT_GROUP_OWNER_OR_MANAGER_TO_REMOVE_BLOCKED_USER3501
Group - Join Request Related ErrorBLOCKED_USER_SEND_GROUP_JOIN_REQUEST3600
GROUP_MEMBER_SEND_GROUP_JOIN_REQUEST3601
NOT_SENDER_TO_RECALL_GROUP_JOIN_REQUEST3602
NOT_GROUP_OWNER_OR_MANAGER_TO_QUERY_GROUP_JOIN_REQUEST3603
RECALL_NON_PENDING_GROUP_JOIN_REQUEST3604
SEND_GROUP_JOIN_REQUEST_TO_INACTIVE_GROUP3605
SEND_GROUP_JOIN_REQUEST_TO_GROUP_USING_MEMBERSHIP_REQUEST3606
SEND_GROUP_JOIN_REQUEST_TO_GROUP_USING_INVITATION3607
SEND_GROUP_JOIN_REQUEST_TO_GROUP_USING_QUESTION3608
RECALLING_GROUP_JOIN_REQUEST_IS_DISABLED3609
UPDATE_NON_PENDING_GROUP_JOIN_REQUEST3610
NOT_GROUP_OWNER_OR_MANAGER_TO_UPDATE_GROUP_JOIN_REQUEST3611
Group - Invitation Related ErrorSEND_GROUP_INVITATION_TO_GROUP_MEMBER3700
SEND_GROUP_INVITATION_TO_BLOCKED_USER3701
SEND_GROUP_INVITATION_TO_GROUP_NOT_REQUIRING_USERS_APPROVAL3702
NOT_GROUP_OWNER_TO_SEND_GROUP_INVITATION3703
NOT_GROUP_OWNER_OR_MANAGER_TO_SEND_GROUP_INVITATION3704
NOT_GROUP_MEMBER_TO_SEND_GROUP_INVITATION3705
RECALLING_GROUP_INVITATION_IS_DISABLED3706
NOT_GROUP_OWNER_OR_MANAGER_TO_RECALL_GROUP_INVITATION3707
NOT_GROUP_OWNER_OR_MANAGER_OR_SENDER_TO_RECALL_GROUP_INVITATION3708
RECALL_NON_PENDING_GROUP_INVITATION3709
UPDATE_NON_PENDING_GROUP_INVITATION3710
NOT_INVITEE_TO_UPDATE_GROUP_INVITATION3711
NOT_GROUP_OWNER_OR_MANAGER_TO_QUERY_GROUP_INVITATION3712
Conversation - Read Date Related ErrorUPDATING_READ_DATE_IS_DISABLED4000
UPDATING_READ_DATE_IS_DISABLED_BY_GROUP4001
UPDATING_READ_DATE_OF_NONEXISTENT_GROUP_CONVERSATION4002
NOT_GROUP_MEMBER_TO_UPDATE_READ_DATE_OF_GROUP_CONVERSATION4003
MOVING_READ_DATE_FORWARD_IS_DISABLED4004
Conversation - Typing Status Related ErrorUPDATING_TYPING_STATUS_IS_DISABLED4100
NOT_GROUP_MEMBER_TO_SEND_TYPING_STATUS4101
NOT_FRIEND_TO_SEND_TYPING_STATUS4102
Message - Send Related ErrorMESSAGE_RECIPIENT_NOT_ACTIVE5000
NOT_FRIEND_TO_SEND_PRIVATE_MESSAGE5001
BLOCKED_USER_SEND_PRIVATE_MESSAGE5002
BLOCKED_USER_SEND_GROUP_MESSAGE5003
SEND_MESSAGE_TO_INACTIVE_GROUP5004
SEND_MESSAGE_TO_MUTED_GROUP5005
SEND_MESSAGE_TO_NONEXISTENT_GROUP5006
SENDING_MESSAGES_TO_ONESELF_IS_DISABLED5007
MUTED_GROUP_MEMBER_SEND_MESSAGE5008
NOT_SPEAKABLE_GROUP_GUEST_TO_SEND_MESSAGE5009
MESSAGE_IS_ILLEGAL5010
NOT_MESSAGE_RECIPIENT_OR_SENDER_TO_FORWARD_MESSAGE5011
Message - Update Related ErrorUPDATING_MESSAGE_BY_SENDER_IS_DISABLED5100
NOT_SENDER_TO_UPDATE_MESSAGE5101
UPDATE_MESSAGE_OF_NONEXISTENT_GROUP5102
UPDATING_GROUP_MESSAGE_BY_SENDER_IS_DISABLED5103
Message - Recall Related ErrorRECALL_NONEXISTENT_MESSAGE5200
RECALLING_MESSAGE_IS_DISABLED5201
NOT_SENDER_TO_RECALL_MESSAGE5202
RECALL_MESSAGE_OF_NONEXISTENT_GROUP5203
MESSAGE_RECALL_TIMEOUT5204
Message - Query Related ErrorNOT_GROUP_MEMBER_TO_QUERY_GROUP_MESSAGES5300
Storage Related ErrorSTORAGE_NOT_IMPLEMENTED6000
Storage - Message Attachment Related ErrorNOT_FRIEND_TO_UPLOAD_MESSAGE_ATTACHMENT_IN_PRIVATE_CONVERSATION6100
NOT_GROUP_MEMBER_TO_UPLOAD_MESSAGE_ATTACHMENT_IN_GROUP_CONVERSATION6101
NOT_UPLOADER_TO_SHARE_MESSAGE_ATTACHMENT6102
NOT_UPLOADER_OR_GROUP_MANAGER_TO_UNSHARE_MESSAGE_ATTACHMENT_IN_GROUP_CONVERSATION6103
NOT_UPLOADER_TO_UNSHARE_MESSAGE_ATTACHMENT_IN_PRIVATE_CONVERSATION6104
NOT_UPLOADER_OR_GROUP_MANAGER_TO_DELETE_MESSAGE_ATTACHMENT_IN_GROUP_CONVERSATION6105
NOT_UPLOADER_TO_DELETE_MESSAGE_ATTACHMENT_IN_PRIVATE_CONVERSATION6106
NOT_UPLOADER_OR_SHARED_WITH_USER_TO_DOWNLOAD_MESSAGE_ATTACHMENT6107
Storage - Message Attachment Info Related ErrorNOT_FRIEND_TO_QUERY_MESSAGE_ATTACHMENT_INFO_IN_PRIVATE_CONVERSATION6130
NOT_GROUP_MEMBER_TO_QUERY_MESSAGE_ATTACHMENT_INFO_IN_GROUP_CONVERSATION6131

SessionCloseStatus

SessionCloseStatus indicates why the session was closed.

For the specific status code declaration, please refer to im.turms.server.common.access.common.SessionCloseStatus class.

Cause CategoryNameStatus CodeMeaning
Illegal client behaviorILLEGAL_REQUEST100Illegal request
HEARTBEAT_TIMEOUT110Heartbeat timeout
LOGIN_TIMEOUT111Login timeout
SWITCH112Session timeout, TCP or WebSocket switches to UDP and enters dormant keep-alive state
Server behaviorSERVER_ERROR200Server exception error
SERVER_CLOSED201The server enters shutdown state
SERVER_UNAVAILABLE202Service Unavailable
Network layer errorCONNECTION_CLOSED300No close frame received, the network layer connection is forcibly closed
Unknown errorUNKNOWN_ERROR400Unknown server or client behavior error
Closed by the userDISCONNECTED_BY_CLIENT500The current user actively requests to close the session
DISCONNECTED_BY_OTHER_DEVICE501The current session is closed because the current user's other device is online
The administrator actively closesDISCONNECTED_BY_ADMIN600The administrator actively closes the session through the API
User status changeUSER_IS_DELETED_OR_INACTIVATED700User account is deleted or enters inactive state
USER_IS_BLOCKED701User IP or User ID is blocked