Skip to main content

get_sorted_conversation_list

Brief Description

  • Retrieve a sorted list of conversations based on whether they are pinned and the order of message sending time.

Request Method

  • post

Request URL

  • http://x.x.x.x:10002/conversation/get_sorted_conversation_list
Header NameExample ValueOptionalTypeDescription
tokeneyJhbxxxx3XsRequiredstringAdministrator token
operationID1646445464564RequiredstringoperationID for global link tracking

Request Parameters Example

{
"userID": "9906953281",
"conversationIDs": ["si_2699373280_9906953281"],
"pagination":{
"pageNumber":1,
"showNumber":20
}
}
Field NameOptionalTypeDescription
userIDRequiredstringCurrent user ID
conversationIDsOptionalstringConversation ID list, fill in to return to the specified conversation list, do not fill in to return to the default paging of the conversation list
paginationrequiredstringpaging parameter structure
pageNumberrequiredstringCurrent page number, starting from 1
showNumberrequiredstringNumber of requests for the current page

Successful Return Example

{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"unreadTotal": 2,
"conversationTotal": 2,
"data": {
"conversationElems": [
{
"conversationID": "si_110_114",
"recvMsgOpt": 0,
"unreadCount": 1,
"IsPinned": false,
"
": {
"serverMsgID": "c54203436b727117226cb528fc7b08e8",
"clientMsgID": "c972d53afb9d6b9744f1edfc4ac1aeef",
"sessionType": 1,
"sendID": "114",
"recvID": "110",
"senderName": "yourNickname",
"faceURL": "yourFaceURL",
"groupID": "",
"groupName": "",
"groupFaceURL": "",
"groupType": 0,
"groupMemberCount": 0,
"LatestMsgRecvTime": 1695212630741,
"msgFrom": 200,
"contentType": 101,
"content": "{\"content\":\"hello!!\"}",
"ex":""
}
},
{
"conversationID": "si_110_111",
"recvMsgOpt": 0,
"unreadCount": 1,
"IsPinned": false,
"msgInfo": {
"serverMsgID": "5c3d8542f9eae1487283a5fe335aab1a",
"clientMsgID": "e09109bdfeb221cec1827317c313e3d0",
"sessionType": 1,
"sendID": "111",
"recvID": "110",
"senderName": "yourNickname",
"faceURL": "yourFaceURL",
"groupID": "",
"groupName": "",
"groupFaceURL": "",
"groupType": 0,
"groupMemberCount": 0,
"LatestMsgRecvTime": 1695212630740,
"msgFrom": 200,
"contentType": 101,
"content": "{\"content\":\"hello!!\"}",
"ex":""
}
}
]
}
}

Successful Return Parameters Explanation

Field NameTypeDescription
errCodeintError code, 0 means success
errMsgstringBrief error message, empty if no error
errDltstringDetailed error message, empty if no error
unreadTotalstringTotal number of unread
conversationToalstringTotal number of conversation
dataobjectCommon data object, see below for specific structure
conversationElemsarray-
conversationIDstringConversation ID
recvMsgOptintGroup chat message do not disturb
unreadCountintNumber of unread messages
msgInfoobjectMessage content
serverMsgIDstringServer message ID
clientMsgIDstringClient message ID
sessionTypeintSession type, 1 for individual chat, 2 for group chat, 3 for large group, 4 for notification session
recvIDstringReceiver ID
sendIDstringSender ID
faceURLstringAvatar URL. In individual chat, this field is the friend's avatar URL when the sender is the current user
senderNamestringSender's nickname. In individual chat, this field is the friend's nickname when the sender is the current user. In group chat, it is the corresponding sender's nickname
LatestMsgRecvTimelongTime of receiving the last message
msgFromintMessage source, 100 from user, 200 from admin or system broadcast notification
contentobjectDetailed content of the message, internal is a json object, for other message details refer to Message Type Format Description document
contentTypeintMessage Type
groupIDstringGroup chat ID
groupNamestringGroup chat name
groupFaceURLstringGroup chat avatar URL
groupMemberCountintNumber of group chat members
IsPinnedboolWhether the conversation is pinned
exstringExpanded Fields

Failure Return Example

{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": 1004 RecordNotFoundError"
}

Failure Return Parameters Explanation

Parameter NameTypeDescription
errCodeintError code, refer to global error code document for specifics
errMsgstringBrief error message
errDltstringDetailed error message