查询互动监听事件列表
更新时间:2026-05-22 10:16:23
接口描述
由业务服务端调用,查询指定频道下当前仍挂在监听队列中的互动监听任务列表;
接口支持 HTTPS 协议。
接口URL
https://api.polyv.net/live/v5/chat/redirect/channel/interaction_event/list
请求方式
GET
接口约束
1、接口同时支持 HTTP、HTTPS,建议使用 HTTPS 确保接口安全。
2、**status** 由服务端根据当前时间与任务的 startTime、endTime 计算:waiting(未开始)、running(进行中)、ended(已结束)。
3、列表按频道维度查询;同一频道可能存在历史活动遗留的其它有效任务,联调时建议结合 save/remove 或管理端清理。
请求参数描述
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| appId | true | String | 账号appId【详见获取密钥】 |
| timestamp | true | Long | 当前13位毫秒级时间戳,3分钟内有效 |
| sign | true | String | 签名,为32位大写的MD5值,生成签名的appSecret密钥作为通信数据安全的关键信息,严禁保存在客户端直接使用,所有API都必须通过客户自己服务器中转调用POLYV服务器获取响应数据【详见签名生成规则】 |
| roomId | true | String(1,100) | 频道号(query 参数) |
示例
请求示例:
GET https://api.polyv.net/live/v5/chat/redirect/channel/interaction_event/list?roomId=412738
响应体 JSON(成功):
{
"code": 200,
"status": "success",
"message": "获取成功",
"data": {
"list": [
{
"taskId": "task_sign_001",
"activityId": "activity_20250521_001",
"type": "signCount",
"startTime": 1747785600000,
"endTime": 1747785660000,
"status": "running",
"signCount": 1
}
]
}
}
无有效任务时 data.list 为空数组 []。
响应参数描述
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | Integer | 200 表示成功;400 多为参数校验失败;500 多为业务错误或服务端异常 |
| status | String | success / fail / error |
| message | String | 如「获取成功」或具体错误说明 |
| data | Object | 含 list(任务对象数组) |
data.list 元素字段
| 参数名 | 类型 | 说明 |
|---|---|---|
| taskId | String | 任务 ID |
| activityId | String | 活动 ID |
| type | String | 任务类型,见 save 接口 taskList.type |
| startTime | Number | 开始时间(毫秒时间戳) |
| endTime | Number | 结束时间(毫秒时间戳) |
| status | String | waiting | running | ended |
| userTags | String[] | 用户标签 ID 列表(可选) |
| payload | String | 自定义 payload(可选) |
| onlineTime | Number | type 为 onlineTime 时返回 |
| signCount | Number | type 为 signCount 时返回 |
| likesCount | Number | type 为 likesCount 时返回 |
| speakCount | Number | type 为 speakCount 时返回 |
| speakContent | String | type 为 speakCount 时返回 |
| customCount | Number | type 为 customCount 时返回 |
| eventType | String | type 为 customCount 时返回 |
| loginDays | Number | type 为 loginDays 时返回 |
| minOnlineTimePerDay | Number | type 为 loginDays 时返回 |
| logicType | String | AND | OR(可选) |
| allDone | String | Y | N(可选) |
| isUnlock | String | Y | N(可选) |
| parentTaskId | String | 父任务 ID(可选) |
异常示例
参数校验失败:
{
"code": 400,
"status": "fail",
"message": "缺少参数roomId"
}
频道与账号不匹配:
{
"code": 400,
"status": "fail",
"message": "roomId非法"
}
未传 x-auth-user-id:
{
"code": 400,
"status": "fail",
"message": "accountId is required"
}
服务端异常:
{
"code": 500,
"status": "error",
"message": "获取失败"
}
(具体 message 以实际错误信息为准。)
