跳至主要內容

聊天记录

大约 3 分钟

聊天记录

查询聊天记录

  • 描述

    分页查询聊天记录

  • URI

    /wscrm-bus-api/open/message/msgPage

  • 请求方式

    POST、Content-Type: application/json

  • 请求参数说明

参数名类型是否必填备注
tenantIdLong公司编号(联系管理员获取)
userNameString管理员账号
infoObject查询条件
tokenStringtoken
createTimeString创建时间
currentint页码 默认1
pageSizeint数量 默认10

info参数说明

参数名类型是否必填备注
friendWhatsIdString目标客户
whatsIdString客服账号
chatTypeInteger消息类别 1 个人2 群聊
actionTypeInteger1 发送 2接收
contentTypeString内容类型
startChatTimeLong聊天时间(起始) 毫秒级时间戳
endChatTimeLong聊天时间(结束) 毫秒级时间戳
agentAccountString坐席账号(完全匹配)

注:范围时间需要成双成对出现,即数据创建时间需要起始和结束同时出现,聊天时间起始和结束需要同时出现

  • 请求示例
{
    "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"
    }
}
  • 响应参数说明

    参数名类型是否必填示例值备注
    codeint200状态码
    messageString成功描述
    dataObject数据

    data参数说明

    参数名类型是否必填示例值备注
    totalInteger1总数量
    sizeInteger条数
    currentInteger当前页码
    pagesInteger
    recordsarray数据数组

    records对象参数说明

    参数名类型是否必填示例值备注
    usernamestring1坐席账号
    whatsIdstring客服账号
    actionTypeInteger动作类型 1 发送 2接收
    chatTypeInteger消息类别 1 个人2 群聊
    content聊天内容 (结构根据聊天类型进行变化)
    contentTypeInteger聊天类型
    friendWhatsIdstring聊天目标对象
    friendNamestring聊天目标对象名称
    chatTimelong聊天时间
    createTimelong数据创建时间

详细聊天内容类型介绍: 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
    }
}
上次编辑于:
贡献者: 罗英杰