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
Header Name | Example Value | Optional | Type | Description |
---|---|---|---|---|
token | eyJhbxxxx3Xs | Required | string | Administrator token |
operationID | 1646445464564 | Required | string | operationID for global link tracking |
Request Parameters Example
{
"userID": "9906953281",
"conversationIDs": ["si_2699373280_9906953281"],
"pagination":{
"pageNumber":1,
"showNumber":20
}
}
Field Name | Optional | Type | Description |
---|---|---|---|
userID | Required | string | Current user ID |
conversationIDs | Optional | string | Conversation 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 |
pagination | required | string | paging parameter structure |
pageNumber | required | string | Current page number, starting from 1 |
showNumber | required | string | Number 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 Name | Type | Description |
---|---|---|
errCode | int | Error code, 0 means success |
errMsg | string | Brief error message, empty if no error |
errDlt | string | Detailed error message, empty if no error |
unreadTotal | string | Total number of unread |
conversationToal | string | Total number of conversation |
data | object | Common data object, see below for specific structure |
conversationElems | array | - |
conversationID | string | Conversation ID |
recvMsgOpt | int | Group chat message do not disturb |
unreadCount | int | Number of unread messages |
msgInfo | object | Message content |
serverMsgID | string | Server message ID |
clientMsgID | string | Client message ID |
sessionType | int | Session type, 1 for individual chat, 2 for group chat, 3 for large group, 4 for notification session |
recvID | string | Receiver ID |
sendID | string | Sender ID |
faceURL | string | Avatar URL. In individual chat, this field is the friend's avatar URL when the sender is the current user |
senderName | string | Sender'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 |
LatestMsgRecvTime | long | Time of receiving the last message |
msgFrom | int | Message source, 100 from user, 200 from admin or system broadcast notification |
content | object | Detailed content of the message, internal is a json object, for other message details refer to Message Type Format Description document |
contentType | int | Message Type |
groupID | string | Group chat ID |
groupName | string | Group chat name |
groupFaceURL | string | Group chat avatar URL |
groupMemberCount | int | Number of group chat members |
IsPinned | bool | Whether the conversation is pinned |
ex | string | Expanded Fields |
Failure Return Example
{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": 1004 RecordNotFoundError"
}
Failure Return Parameters Explanation
Parameter Name | Type | Description |
---|---|---|
errCode | int | Error code, refer to global error code document for specifics |
errMsg | string | Brief error message |
errDlt | string | Detailed error message |