获取房间聊天记录列表

Example

POST getchatlist

https://global.talk-cloud.net/WebAPI/getchatlist

参数

参数名 是否必填 类型 说明
key String 企业Key
serial String 房间编号:选填(该字段和thirdroomid必须至少填写一个)
thirdroomid String 用户自定义房间号:选填(该字段和serial必须至少填写一个)如果用户创建房间时自定义了房间号,可使用此字段
starttime Int 开始时间 (时间截示例:1597852800)
endtime Int 结束时间 (时间截示例:1597852800)
page Int 页数 (默认第一页,每页返回100条)
参数名 类型 备注
result Int 0:成功 -1:缺少房间id或房间不存在
info String 返回说明
serial String 房间号
msg String 发送内容
fromID String 发送的用户id
toID String 接收的用户id/__all代表所有人
nickname String 发送的用户名
type Int 聊天类型 0:公聊 1 私聊
ts bigInt 聊天时间截
companyid String 企业ID
role Int 角色id

返回示例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
    "result":0,
    "info":"OK",
    "pageList": {
        "total": 1115,
        "page": "1",
        "shownum": "100"
    },
    "data":[
        {
            "_id":{
                "$oid":"5ee9df3287615246ba5412df"
            },
            "serial":"1341570284",
            "msg":"\u5f00\u59cb\u4e0a\u8bfe",
            "fromID":"770f5e14-a5db-769b-51ff-cd66266f252e",
            "toID":"__all",
            "nickname":"IWantSeeYouAgain",
            "type":0,
            "ts":1592385330588,
            "companyid":"10377",
            "role":0
        },
        {
            "_id":{
                "$oid":"5ee9df2ea43e5050a4a4fe69"
            },
            "serial":"1341570284",
            "msg":"\u60a8\u597d",
            "fromID":"770f5e14-a5db-769b-51ff-cd66266f252e",
            "toID":"123123123123",
            "nickname":"IWantSeeYouAgain",
            "type":1,
            "ts":1592385326966,
            "companyid":"10377",
            "role":0
        }
    ]
}

© 2016-2023 北京拓课网络科技有限公司 版权所有  京ICP备17018423号-1 京公网安备11010502043461号