接口调用说明
通过该接口查询会话记录
请求URL示例
https://console.tim.qq.com/v4/desk_http_svc/describe_im_cdr_list?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
请求参数说明
参数 | 说明 |
v4/desk_http_svc/describe_im_cdr_list | 请求接口。 |
sdkappid | 创建应用时即时通信 IM 控制台分配的 SDKAppID。 |
identifier | |
usersig | |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295。 |
contenttype | 请求格式固定值为 json。 |
请求包示例
{"StartTimestamp": 1730390400,"EndTimestamp": 1730476799,"ClientUserId": "1299314544","Limit": 10,"Offset": 0}
请求包字段说明
字段 | 类型 | 属性 | 说明 |
StartTimestamp | Integer | 必填 | 起始时间,Unix 秒级时间戳 |
EndTimestamp | Integer | 必填 | 结束时间,Unix 秒级时间戳 |
Limit | Integer | 选填 | 返回记录条数,最大为100默认20 示例值:100 |
Offset | Integer | 选填 | 返回记录偏移,默认为 0 示例值:0 |
ClientUserId | String | 选填 | 指定要查询的用户ID |
应答包体示例
{"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": "","TotalCount": 1,"IMCdrList": [{"SessionId": "a97d3e1f-a88b-403b-9b3a-7bc6554ea05d","AgentGroupId": "3067","AgentGroupName": "在线客服","AgentId": "shannon@qq.com","ChannelType": "SDK","ClientUserId": "1299314544","ClientUserNickName": "山浓","Duration": 10,"EndStatus": "AgentEndedSession","SatisfactionSelected": 5,"Timestamp": 1730443136}]}
应答包字段说明
字段 | 类型 | 说明 |
ErrorCode | Integer | 错误码: 0表示成功 非0表示失败 |
ErrorInfo | String | 错误信息 |
ActionStatus | String | 请求处理的结果 |
TotalCount | Integer | 总记录数 |
IMCdrList | Array | 会话服务记录列表 |
SessionId | String | 会话的 SessionID |
AgentGroupId | String | 客服分组ID |
AgentGroupName | String | 客服分组名称 |
AgentId | String | 人工客服 ID |
ChannelType | String | 集成方式: SDK:SDK 集成,对应智能客服管理端的“应用/客户端”集成 Web(H5):Web 集成,对应智能客服管理端的“网页(H5)”集成 |
ClientUserId | String | 用户ID |
ClientUserNickName | String | 用户昵称 |
Duration | Integer | 会话持续时长,单位秒 |
EndStatus | String | 会话结束状态: "AgentEndedSession": 客服结束会话 "UserEndedSession":用户结束会话 "UserTimeout":用户超时结束 "AgentTimeout" 客服超时结束 "ChatbotReception":机器人接待 "NoAgentsOnline":无坐席在线 "TimeoutTransfer":超时转接 "ManualTransfer":手动转接 "UserAbandonedDuringQueueing":队列等待时放弃 |
SatisfactionSelected | Integer | 满意度评价星级(1 ~ 5),例如:5代表评价为五星 |
Timestamp | Integer | 会话时间,Unix 秒级时间戳 |
错误码说明
除非发生网络错误(例如502错误),否则该接口的 HTTP 返回码均为200。真正的错误码,错误信息是通过应答包体中的 ErrorCode、ErrorInfo 来表示的。
本 API 私有错误码如下:
错误码 | 描述 |
141000 | 该应用非智能客服应用。 |
141002 | 内部错误,请重试。 |
141004 | 参数非法。 |
141009 | 接口限频。 |
接口调试工具