获取排序后的会话列表
简要描述
- 根据是否置顶、发消息的时间先后获取排序后的会话列表。
 
请求方式
post
请求URL
{API_ADDRESS}/conversation/get_sorted_conversation_list
Header
| header名 | 示例值 | 选填 | 类型 | 说明 | 
|---|---|---|---|---|
| operationID | 1646445464564 | 必填 | string | 用于全局链路追踪,建议使用时间戳,在每个请求中独立 | 
| token | eyJhbxxxx3Xs | 必填 | string | 管理员 token | 
请求参数示例
{
  "userID": "9906953281",
  "conversationIDs": ["si_2699373280_9906953281"],
  "pagination":{
    "pageNumber":1,
    "showNumber":20
    }
}
| 字段名 | 选填 | 类型 | 说明 | 
|---|---|---|---|
| userID | 必填 | string | 当前用户ID | 
| conversationIDs | 选填 | string | 会话ID列表,填写后返回指定的会话列表,不填返回默认分页的会话列表 | 
| pagination | 必填 | string | 分页参数结构体 | 
| pageNumber | 必填 | string | 当前页码,从1开始 | 
| showNumber | 必填 | string | 当前页请求数量 | 
成功返回示例
{
  "errCode": 0,
  "errMsg": "",
  "errDlt": "",
  "data": {
    "conversationTotal": 2,
    "unreadTotal": 2,
    "conversationElems": [
      {
        "conversationID": "si_110_114",
        "recvMsgOpt": 0,
        "unreadCount": 1,
        "IsPinned": false,
        "msgInfo": {
          "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":""
        }
      }
    ]
  }
}
成功返回示例的参数说明
| 字段名 | 类型 | 说明 | 
|---|---|---|
| errCode | int | 错误码,0表示成功 | 
| errMsg | string | 错误简要信息,为空 | 
| errDlt | errDlt | 错误详细信息,为空 | 
| unreadTotal | string | 未读数总数 | 
| conversationToal | string | 会话数总数 | 
| data | object | 通用数据对象,具体结构见下方 | 
| conversationElems | array | 无 | 
| conversationID | string | 会话ID | 
| recvMsgOpt | string | 群聊消息免打扰 | 
| unreadCount | string | 未读消息数 | 
| msgInfo | object | 消息内容 | 
| serverMsgID | string | 服务器消息ID | 
| clientMsgID | string | 客户端消息ID | 
| sessionType | string | 会话类型,发送的消息是单聊还是群聊,单聊为1,群聊(普通写扩散)为2,大群(读扩散接口)为3,通知会话为4 | 
| recvID | string | 接收者ID | 
| SendID | string | 发送者ID | 
| faceURL | string | 头像URL。在单聊中,当发送者为当前用户时,该字段为好友头像URL | 
| senderName | string | 发送者呢称。在单聊中,当发送者为当前用户时,该字段为好友呢称。在群聊中,该字段为对应的发送者呢称 | 
| LatestMsgRecvTime | string | 最后一条消息的接收时间 | 
| msgFrom | string | 消息来源,100来源于用户发送,200来源于管理员发送或者系统广播通知等 | 
| content | object | 消息的具体内容,内部是json 对象,其他消息的详细字段请参考消息类型格式描述文档 | 
| contentType | int | 消息类型 | 
| groupID | string | 群聊ID | 
| groupName | string | 群聊名称 | 
| groupFaceURL | string | 群聊头像URL | 
| groupMemberCount | string | 群聊人数 | 
| IsPinned | string | 会话是否置顶 | 
| ex | string | 拓展字段 | 
失败返回示例
{
    "errCode": 1004,
    "errMsg": "RecordNotFoundError",
    "errDlt": ": 1004 RecordNotFoundError"
}
失败返回示例的参数说明
| 参数名 | 类型 | 说明 | 
|---|---|---|
| errCode | int | 错误码,具体查看全局错误码文档 | 
| errMsg | string | 错误简要信息 | 
| errDlt | errDlt | 错误详细信息 |