Polyv Help Center

Help Center

Channel Promotion List

Updated: 2026-07-13 11:57:31

API Description

1、查询渠道推广列表
2、接口支持https协议

API URL

http://api.polyv.net/live/v4/channel/popularization/list

Online API Call

Request Method

GET

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended to ensure API security. API calls are subject to rate limits. See details

Request Parameter Description

Parameter Required Type Description
appId true String Account appId See details on obtaining keys
timestamp true Long Current 13-digit millisecond timestamp, valid for 3 minutes
sign true String Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be stored or 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 String Channel ID

Example

http://api.polyv.net/live/v4/channel/popularization/list?appId=frlr1zazn3&sign=39744576F6CECA12533CD8C73EF166D2&channelId=2272655&timestamp=1639730848124

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: success returns "success", failure returns "error"
success Boolean Response result, determined by business logic: success returns true, failure returns false
data Object Distribution list information returned on successful response 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, used only for troubleshooting and debugging, should not be tied to business logic

Error Parameter Description

Parameter Type Description
code Integer Error code, used to identify the specific error cause
desc String Error description, corresponding to error.code

data Parameter Description

Parameter Type Description
pageNumber Integer Current page number
pageSize Integer Page size
totalPages Integer Total number of pages
totalItems Integer Total number of records
contents Array Paginated data collection: ChannelPopularizationViewerVO

ChannelPopularizationViewerVO Parameter Description

Parameter Type Description
promoteId String Channel ID
popularizationName String Channel name
visitsNum long Total number of visits
reservationNum int Number of reservations
watchNum int Number of views
viewerNum int Number of viewers
averageWatchTime String Average watch time per viewer
enrollNum int Number of enrolled viewers
createdTime int Creation time (13-digit millisecond timestamp)

Java Request Example

For quick integration of basic code, download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source code project. The test cases include HttpUtil.java and LiveSignUtil.java in the downloaded file.

It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified packaging and optimization for API call logic, exception handling, data signing, and HTTP request thread pooling.

private static final Logger log = LoggerFactory.getLogger(getClass());
/**
 * 查询渠道推广列表
 * @throws IOException
 */
@Test
public void list() throws IOException, NoSuchAlgorithmException {
    //公共参数,填写自己的实际参数
    String appId = super.appId;
    String appSecret = super.appSecret;
    String userId = super.userId;
    String timestamp = String.valueOf(System.currentTimeMillis());
    
    //业务参数
    String url = "http://api.polyv.net/live/v4/channel/popularization/list";
    String channelId = "2272655";
    
    //http 调用逻辑
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("channelId", channelId);
    
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
    String response = HttpUtil.get(url, requestMap);
    log.info("测试查询分发地址及开关状态,返回值:{}", response);
    //do somethings
    
}

Response Example

For system-wide error descriptions, see Global Error Descriptions

Success Example

{
    "code": 200,
    "data": {
        "contents": [
            {
                "averageWatchTime": "00:00:00",
                "createdTime": 1616384611000,
                "enrollNum": 0,
                "popularizationName": "甘肃分公司",
                "promoteId": "Fq5gpU",
                "reservationNum": 10,
                "viewerNum": 10,
                "visitsNum": 20,
                "watchNum": 40
            },
            {
                "averageWatchTime": "00:00:00",
                "createdTime": 1616384156000,
                "enrollNum": 0,
                "popularizationName": "新疆分公司",
                "promoteId": "rqibqI",
                "reservationNum": 10,
                "viewerNum": 10,
                "visitsNum": 50,
                "watchNum": 30
            }
        ],
        "pageNumber": 1,
        "pageSize": 10,
        "totalItems": 30,
        "totalPages": 3
    },
    "requestId": "3eda6c34-018c-4744-af02-93c85151f0ee",
    "status": "success",
    "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "requestId": "366c4df40d814803a6ee3b04ceec437e.680953.16397317894687813",
    "error": {
        "code": 30004,
        "desc": "找不到频道"
    },
    "success": false
}
联系客服,在线咨询
在线咨询