聊天记录
大约 3 分钟
聊天记录
查询聊天记录
描述
分页查询聊天记录
URI
/wscrm-bus-api/open/message/msgPage
请求方式
POST、Content-Type: application/json
请求参数说明
参数名 | 类型 | 是否必填 | 备注 |
---|---|---|---|
tenantId | Long | 是 | 公司编号(联系管理员获取) |
userName | String | 是 | 管理员账号 |
info | Object | 是 | 查询条件 |
token | String | 是 | token |
createTime | String | 是 | 创建时间 |
current | int | 否 | 页码 默认1 |
pageSize | int | 否 | 数量 默认10 |
info参数说明
参数名 | 类型 | 是否必填 | 备注 |
---|---|---|---|
friendWhatsId | String | 否 | 目标客户 |
whatsId | String | 否 | 客服账号 |
chatType | Integer | 否 | 消息类别 1 个人2 群聊 |
actionType | Integer | 否 | 1 发送 2接收 |
contentType | String | 否 | 内容类型 |
startChatTime | Long | 否 | 聊天时间(起始) 毫秒级时间戳 |
endChatTime | Long | 否 | 聊天时间(结束) 毫秒级时间戳 |
agentAccount | String | 否 | 坐席账号(完全匹配) |
注:范围时间需要成双成对出现,即数据创建时间需要起始和结束同时出现,聊天时间起始和结束需要同时出现
- 请求示例
{
"tenantId":82,
"userName":"moppo1017",
"token":"520d97aedfc5cc1beaeb129fa8ab2a31",
"createTime":"2024-02-02 00:00:00",
"current":1,
"pageSize":10,
"info":{
"whatsId":"",
"friendWhatsId":"91844XXXX",
"chatType":1,
"contentType":2,
"agentAccount":"dev_miors"
}
}
响应参数说明
参数名 类型 是否必填 示例值 备注 code int 是 200 状态码 message String 否 成功 描述 data Object 否 数据 data参数说明
参数名 类型 是否必填 示例值 备注 total Integer 是 1 总数量 size Integer 是 条数 current Integer 是 当前页码 pages Integer 是 records array 是 数据数组 records对象参数说明
参数名 类型 是否必填 示例值 备注 username string 是 1 坐席账号 whatsId string 是 客服账号 actionType Integer 是 动作类型 1 发送 2接收 chatType Integer 是 消息类别 1 个人2 群聊 content 是 聊天内容 (结构根据聊天类型进行变化) contentType Integer 是 聊天类型 friendWhatsId string 是 聊天目标对象 friendName string 是 聊天目标对象名称 chatTime long 是 聊天时间 createTime long 是 数据创建时间
详细聊天内容类型介绍: 0、普通文字;1、图片;2、视频;3、音频;4、文件;6,名片;7、贴图;9、引用消息
- 响应示例
{
"code": 200,
"message": "Success ",
"data": {
"records": [
{
"id": "2082",
"userId": 1255,
"username": "kubrick108",
"whatsId": "86131xxxxxx",
"actionType": 1,
"chatType": 1,
"content": "{\"caption\":\"hasaki\",\"filename\":\"wallpaper.png\",\"mimeType\":\"image/png\",\"type\":4,\"url\":\"http://wascrm008.oss-ap-southeast-1.aliyuncs.com/8435252A37C416whatsapp2CB4454C3EB0CC2D32D87993DACE07?Expires=1742354786&OSSAccessKeyId=STS.NWfTNWrMnN8g2VRK32yjgVsiK&Signature=ior0i3YcXR8nQSY27Wdmy2z9mec%3D&security-token=CAIS9gJ1q6Ft5B2yfSjIr5TTH%2FTjn5JP%2BfqMMHDjrzNndeVLubbCqTz2IHpJdHJrBOAZsPo1m2BS7v0dlo16E5RJH0GVY44g4s4NtF%2FxP4aE6sfsvflYg8H9FDjOUhD10pKKqzg0x2GHKJmXcFnhunJZ89mTLEefPTGMNZmOluQQDLA%2BVRW5ajxrHcpfIhAYxuYRKXrWM4TCUHPtmXGCTjAr2GxGhHh49L60z%2BCF9xPalyea8OIOoJnrKZXWCKsJNZxkAdCux740JOiTkgwoskgarvgq3PEaoGqY5o3NW2M8uUvWb7DmlfR0NxJ8a6QAHKpJkePxj%2FUQuJaIzdmnkE0Qbb4LDX6AFNr4m5TeY%2BiuM9M%2Bc%2FPgJ2%2BI28qKc4Pytw40ue%2BppfOpv7HLQ1oH6nxEIlmyQsfPc2DS6YsIeIavxEBbAzfkAhiZPDsnaophec%2Ft9QwyFLGykS2mSRCYcxLP3EEInQICETdFQ4LxZ%2BEVyHgLbvzR7GW6PhqAAVyckDg%2FpKbDfz5pqvGkNw7lzP1j3d%2FrINXTZSYNWd%2Bq0IOYEsQ4aHfyNBLyxsbIh4Bxg3btIMNCROp6ZzU3hkT%2F%2FREMNJSNCf1lo5awaYYB0QXyB6op2c0hCPXRw1sbz%2FGwvMXQY20lj5SjiIirfsWcAsufbm%2FNdTzPIZqFjzeFIAA%3D\",\"referContent\":{\"caption\":\"\",\"filename\":\"8435252A37C416whatsapp2CB4454C3EB084F0BFB4F7694B9684\",\"mimeType\":\"image/jpeg\",\"type\":1,\"url\":\"http://wascrm008.oss-ap-southeast-1.aliyuncs.com/8435252A37C416whatsapp2CB4454C3EB084F0BFB4F7694B9684?Expires=1742354786&OSSAccessKeyId=STS.NWfTNWrMnN8g2VRK32yjgVsiK&Signature=490ZbvCQCVDpfdrlp6sLVGPqclA%3D&security-token=CAIS9gJ1q6Ft5B2yfSjIr5TTH%2FTjn5JP%2BfqMMHDjrzNndeVLubbCqTz2IHpJdHJrBOAZsPo1m2BS7v0dlo16E5RJH0GVY44g4s4NtF%2FxP4aE6sfsvflYg8H9FDjOUhD10pKKqzg0x2GHKJmXcFnhunJZ89mTLEefPTGMNZmOluQQDLA%2BVRW5ajxrHcpfIhAYxuYRKXrWM4TCUHPtmXGCTjAr2GxGhHh49L60z%2BCF9xPalyea8OIOoJnrKZXWCKsJNZxkAdCux740JOiTkgwoskgarvgq3PEaoGqY5o3NW2M8uUvWb7DmlfR0NxJ8a6QAHKpJkePxj%2FUQuJaIzdmnkE0Qbb4LDX6AFNr4m5TeY%2BiuM9M%2Bc%2FPgJ2%2BI28qKc4Pytw40ue%2BppfOpv7HLQ1oH6nxEIlmyQsfPc2DS6YsIeIavxEBbAzfkAhiZPDsnaophec%2Ft9QwyFLGykS2mSRCYcxLP3EEInQICETdFQ4LxZ%2BEVyHgLbvzR7GW6PhqAAVyckDg%2FpKbDfz5pqvGkNw7lzP1j3d%2FrINXTZSYNWd%2Bq0IOYEsQ4aHfyNBLyxsbIh4Bxg3btIMNCROp6ZzU3hkT%2F%2FREMNJSNCf1lo5awaYYB0QXyB6op2c0hCPXRw1sbz%2FGwvMXQY20lj5SjiIirfsWcAsufbm%2FNdTzPIZqFjzeFIAA%3D\",\"whatsId\":\"918448631208@c.us\",\"msgId\":\"3EB084F0BFB4F7694B9684\"}}",
"contentType": 9,
"friendWhatsId": "91844xxxxxx",
"friendName": "",
"chatTime": 1733225447000,
"createTime": 1733230230000
},
{
"id": "23383535",
"userId": 846164,
"username": "kubrick108",
"whatsId": "5735xxxx",
"actionType": 2,
"chatType": 1,
"content": "这里是China",
"contentType": 0,
"friendWhatsId": "905343694925",
"friendName": "",
"chatTime": 1741962820000,
"createTime": 1741962822000
},
{
"id": "40830094",
"userId": 846311,
"username": "kubrick108",
"whatsId": "5735xxxx",
"actionType": 2,
"chatType": 2,
"content": "{\"filename\":\"null\",\"url\":\"https://whatsappscrm.oss-ap-southeast-1.aliyuncs.com/542192/soundRecordUploadFile/20241024/IMG-20241024-WA0008.jpg\",\"mimeType\":\"image/jpeg\",\"caption\":\"\"}",
"contentType": 1,
"friendWhatsId": "120363295594719602",
"friendName": "",
"chatTime": 1729753057000,
"createTime": 1729753081000
},
{
"id": "39604704",
"userId": 846302,
"username": "kubrick108",
"whatsId": "5735xxxx",
"actionType": 1,
"chatType": 1,
"content": "{\"filename\":\"d36a02a3-2566-453a-8a71-bf577dc64beb.mp4\",\"url\":\"https://whatsappscrm.oss-ap-southeast-1.aliyuncs.com/542192/soundRecordUploadFile/20241023/VID-20241023-WA0011.mp4\",\"mimeType\":\"video/mp4\",\"caption\":\"\"}",
"contentType": 2,
"friendWhatsId": "5735xxxx",
"friendName": "",
"chatTime": 1729686522154,
"createTime": 1729686537000
},
{
"id": "23383328",
"userId": 846164,
"username": "kubrick108",
"whatsId": "5735xxxx",
"actionType": 2,
"chatType": 1,
"content": "{\"filename\":\"null\",\"url\":\"https://whatsappscrm.oss-ap-southeast-1.aliyuncs.com/542192/soundRecordUploadFile/20250314/PTT-20250314-WA0001.opus\",\"mimeType\":\"audio\",\"caption\":\"\"}",
"contentType": 3,
"friendWhatsId": "9053436xxxxxx",
"friendName": "",
"chatTime": 1741962804000,
"createTime": 1741962815000
},
{
"id": "40791329",
"userId": 846302,
"username": "kubrick108",
"whatsId": "5735xxxx",
"actionType": 2,
"chatType": 2,
"content": "{\"filename\":\"2dc7dc135da9abad576ce2049a4f4b44.jpeg\",\"url\":\"https://whatsappscrm.oss-ap-southeast-1.aliyuncs.com/542192/soundRecordUploadFile/20241024/2dc7dc135da9abad576ce2049a4f4b44.jpeg\",\"mimeType\":\"document\",\"caption\":\"2dc7dc135da9abad576ce2049a4f4b44.jpeg\"}",
"contentType": 4,
"friendWhatsId": "120363295594719602",
"friendName": "",
"chatTime": 1729751088000,
"createTime": 1729751099000
},
{
"id": "38390136",
"userId": 824461,
"username": "kubrick108",
"whatsId": "5735xxxx",
"actionType": 1,
"chatType": 1,
"content": "BEGIN:VCARD\nVERSION:3.0\nN:;Jack 001;;;\nFN:Jack 001\nX-WA-BIZ-NAME:ChiuChiu Furniture\nTEL;type=CELL;type=VOICE;waid=4477590xxxxx:+44 7759 xxxxx\nEND:VCARD",
"contentType": 6,
"friendWhatsId": "5735xxxx",
"friendName": "",
"chatTime": 1742780478000,
"createTime": 1742780487000
},
{
"id": "38411417",
"userId": 866063,
"username": "kubrick108",
"whatsId": "5735xxxx",
"actionType": 2,
"chatType": 1,
"content": "{\"filename\":\"8672762A37C416whatsapp2CB4454C3A422ABC9FE76503910D\",\"url\":\"https://wascrm-oss-static.socialepoch.com/client/da1af6271ac8df062768aa80da058172/8672762A37C416whatsapp2CB4454C3A422ABC9FE76503910D\",\"mimeType\":\"image/webp\",\"caption\":\"\"}",
"contentType": 7,
"friendWhatsId": "5735xxxx",
"friendName": "Evbuomwan Lawrence",
"chatTime": 1742782392000,
"createTime": 1742782401000,
}
],
"total": 1,
"size": 10,
"current": 1,
"pages": 1
}
}