Query Task Reward Activity Viewer Reward Detail Paginated List
Updated: 2025-09-25 11:46:33
API Description
1、查询任务奖励活动观众奖励明细分页列表
2、接口支持https协议
API URL
https://api.polyv.net/live/v4/channel/task-reward-activity/viewer-detail
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId See Get Secret Key |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid for 3 minutes |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret used to generate the signature is critical for communication data security. It must not be used directly on the client. All APIs must be called through your own server to relay requests to the POLYV server for response data. See Signature Generation Rules |
| channelId | true | Integer | Channel ID |
| activityId | true | Long | Activity ID |
| viewerId | false | String | Viewer ID |
| pageSize | false | Integer | Page size (default 10, max 1000) |
| pageNumber | false | Integer | Page number (currently limited to max 1000 pages) |
Example
https://api.polyv.net/live/v4/channel/task-reward-activity/viewer-detail?channelId=4854808&activityId=1143&viewerId=&pageSize=10&pageNumber=1&appId=frlr1zazn3&sign=012332FBD8DBCFC068AFCB484A2ADECB×tamp=1670550787318
Response body JSON:
{
"code": 200,
"status": "success",
"requestId": "2b023f32-c893-40af-bc13-6e721d516d91",
"data": {
"pageNumber": 1,
"pageSize": 10,
"totalPages": 1,
"totalItems": 2,
"contents": [
{
"viewerId": 1718673362881,
"taskId": 4826,
"sort": 3,
"taskReach": {
"type": "online",
"amount": 2
},
"taskReward": {
"type": "cash",
"amount": "300",
"limit": 1,
"customReward": ""
},
"taskStatus": 1,
"rewardStatus": 3,
"finishTime": 1720611430000
}
]
},
"success": true
}
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code, 200 for success, non-200 for failure |
| status | String | Response result, determined by business logic. Returns success on success, error on failure |
| success | Boolean | Response result, determined by business logic. Returns true on success, false on failure |
| data | Object | Viewer task reward details See Data Field Description |
| error | Object | Error information when status code is non-200 See Error Field Description |
| requestId | String | Request ID, a unique UUID generated for each request. For debugging and troubleshooting only, not for business logic |
data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| pageNumber | Integer | Page number |
| pageSize | String | Page size |
| totalPages | Boolean | Total number of pages |
| totalItems | Object | Total number of records |
| contents | Array | Activity data list See Contents Field Description |
contents Parameter Description
| Parameter | Type | Description |
|---|---|---|
| channelId | Integer | Channel ID |
| activityId | Long | Activity ID |
| viewerId | String | Viewer ID |
| taskId | Integer | Task ID |
| sort | Long | Sort order |
| taskStatus | Long | Achievement status (0: Not achieved, 1: Achieved) |
| rewardStatus | Long | Reward distribution status (-1: No distribution needed, 0: Pending distribution, 1: Distributed, 2: Quota full, 3: Distribution failed, 4: Distributing) |
| finishTime | Long | Achievement time |
| taskReach | Object | Achievement conditions See taskReach Field Description |
| taskReward | Object | Reward data See taskReward Field Description |
taskReach Parameter Description
| Parameter | Type | Description |
|---|---|---|
| type | String | Achievement condition (sign: Check-in, online: Online duration) |
| amount | Integer | Achievement value |
taskReward Parameter Description
| Parameter | Type | Description |
|---|---|---|
| type | String | cash: Cash, custom: Custom, nothing: No reward, externalPoint: External points |
| amount | Integer | Reward value (when type is cash, the unit is cents) |
| limit | Integer | Reward limit quota |
| customReward | String | Custom reward, optional |
error Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Error code, used to identify the specific error |
| desc | String | Error description, corresponding to error.code |
Java Request Example
For quick integration of the base code, please download the relevant dependency source code. Click here to download the source code. Add it to your own source code project after downloading. HttpUtil.java and LiveSignUtil.java in the test cases are included in the downloaded file.
It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.
private final Logger log = LoggerFactory.getLogger(getClass());
/**
* 查询任务奖励活动观众奖励明细分页列表
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void pageTaskRewardTest() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
Integer channelId = 4990862;
Integer activityId = 1134;
Integer pageNumber = 1;
Integer pageSize = 10;
//业务参数
String url = "https://api.polyv.net/live/v4/channel/task-reward-activity/page";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("channelId", channelId);
requestMap.put("activityId", activityId);
requestMap.put("pageSize", pageSize);
requestMap.put("pageNumber", pageNumber);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
log.info("测试查询任务奖励活动观众奖励明细分页列表成功:{}", response);
//do somethings
}
Response Example
For global system error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"requestId": "2b023f32-c893-40af-bc13-6e721d516d91",
"data": {
"pageNumber": 1,
"pageSize": 10,
"totalPages": 1,
"totalItems": 2,
"contents": [
{
"viewerId": 1718673362881,
"taskId": 4826,
"sort": 3,
"taskReach": {
"type": "online",
"amount": 2
},
"taskReward": {
"type": "cash",
"amount": "300",
"limit": 1,
"customReward": ""
},
"taskStatus": 1,
"rewardStatus": 3,
"finishTime": 1720611430000
}
]
},
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
"error": {
"code": 20001,
"desc": "application not found."
},
"success": false
}
