在线系统获取会话数据
创建客户中心导出任务
创建客户中心数据导出任务。start、end 为毫秒时间戳,必须 start < end,且跨度默认不超过 2 天。成功后 message 返回导出 token,后续通过 /usercenter/check 查询文件地址。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| time | any | 是 | 请求时间戳(秒);用于签名鉴权 | |
| checksum | any | 是 | 请求签名校验和 | |
| checksumAlgorithm | integer | 否 | 签名算法:0 - 默认(SHA1),1 - SHA256;不传默认为 0 | |
| appKey | string | 是 | 应用 AppKey |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| start | int64 | 是 | 导出开始时间,毫秒时间戳 | 1735660800000 |
| end | int64 | 是 | 导出结束时间,毫秒时间戳。必须大于 start,且跨度默认不超过 2 天 | 1735747199999 |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| code | int32 | 状态码,200 表示成功 | 200 |
| message | string | 成功时为导出 token、下载任务 ID 或文件下载 URL;失败时为错误原因 | AbCdEfGh |
错误码
| 状态码 | 描述 |
|---|---|
| 14001 | AppKey 不存在 |
| 14002 | checksum 校验失败 |
| 14003 | 请求时间戳与服务器时间误差超过 10 分钟,或不在允许导出的时间窗口内 |
| 14004 | 请求体为空、start/end 缺失或时间范围非法 |
| 14008 | IP 或企业不在导出白名单内 |
| 14500 | 服务内部异常 |
postEndpoint
/openapi/export/usercentercurl -X POST "https://qiyukf.com/openapi/export/usercenter?time=1739347200&checksum=a1b2c3d4e5f607182930abcdefabcdef&checksumAlgorithm=0&appKey=9f1d7c2b8a6e4d3c" \ -H "Content-Type: application/json" \ -d '{ "start": 1735660800000, "end": 1735747199999 }'{
"code": 200,
"message": "AbCdEfGh"
}{
"code": 14001,
"message": "AppKey 不存在"
}{
"code": 14002,
"message": "checksum 校验失败"
}{
"code": 14003,
"message": "请求时间戳与服务器时间误差超过 10 分钟,或不在允许导出的时间窗口内"
}{
"code": 14004,
"message": "请求体为空、start/end 缺失或时间范围非法"
}{
"code": 14008,
"message": "IP 或企业不在导出白名单内"
}{
"code": 14500,
"message": "服务内部异常"
}这篇文档有帮助吗?