Polyv Help Center

Help Center

Query Detailed Information of All Channels

Updated: 2025-06-12 18:59:44

Legacy API endpoint Query Detailed Information of All Channels (Legacy)

API Description

1、查询账号下所有频道详细信息列表,观看页状态与新版后台一致
2、接口支持https协议

API URL

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

Online API Call

Request Method

GET

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended to ensure security. API calls have frequency limits. See details

Request Parameter Description

Parameter Required Type Description
appId true String Account appId See Obtaining 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 stored or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server for response data. See Signature Generation Rules
pageNumber false Integer Page number, defaults to 1
pageSize false Integer Number of data items per page, defaults to 10, maximum cannot exceed 1000
categoryId false String Category ID
watchStatus false String Watch page status filter
live: Live
playback: Playback
end: Ended
waiting: Waiting
unStart: Not started
keyword false String Channel name, fuzzy search
orderBy false String Sort field, defaults to ascending by channel creation time
startTimeDesc: Descending by start time
startTimeAsc: Ascending by start time
channelCreatedTimeDesc: Descending by channel creation time

Example

http://api.polyv.net/live/v4/channel/detail/list?pageNumber=2&watchStatus=unStart&appId=frlr1zazn3&sign=49428741C1D7BEE8BE1EE545F066ECC7&pageSize=3&keyword=%E6%B5%8B%E8%AF%95&categoryId=340019&timestamp=1642734850008

Response Parameter Description

Parameter Type Description
code Integer Status code, same as HTTP status code, used to determine the basic response status
status String Response result, determined by business logic. Returns success on success, error on failure
success Boolean Whether the response was successful
requestId String Request ID, a unique UUID generated for each request. Only used for troubleshooting and debugging, should not be tied to business logic
error Object Error information when status code is not 200 See Error Field Description
data Object See data Field Description

Error Parameter Description

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

Data Parameter Description

Parameter Type Description
pageNumber Integer Current page number
pageSize Integer Number of items per page
totalPages Long Total number of pages
totalItems Long Total number of items
contents Array Content of the current page See contents Field Description

Contents Parameter Description

Parameter Type Description
channelId String Channel ID
name String Channel name
channelPasswd String Channel password
categoryId String Category ID
scene String Scene
alone: Event live streaming
ppt: Three-screen
topclass: Large class
seminar: Seminar
newScene String New backend live streaming scene. If undefined, uses scene
undefined: Undefined
topclass: Large class
double: Dual-teacher class (requires permission)
train: Enterprise training
seminar: Seminar
alone: Event marketing
template String New backend live streaming template. For legacy channels, this field is undefined
undefined: Undefined
ppt: Three-screen (landscape)
portrait_ppt: Three-screen (portrait)
alone: Pure video (landscape)
portrait_alone: Pure video (portrait)
topclass: Pure video - Express (landscape)
portrait_topclass: Pure video - Express (portrait)
seminar: Seminar
watchStatus String Watch page status
live: Live
playback: Playback
end: Ended
waiting: Waiting
unStart: Not started
banpush: Banned from streaming
watchStatusText String Watch page status description: Live, Playback, Ended, Waiting, Not started, Banned from streaming
sceneText String Scene description
watchUrl String Watch page URL
content String Live streaming introduction
startTime Long Live streaming start time, 13-digit millisecond timestamp
pureRtcEnabled String Live streaming latency: Y for no latency, N for normal latency
channelLogo String Channel icon
splashImg String Channel splash image
splashEnabled String Splash page switch
Y: Enabled
N: Disabled
publisher String Host name
authSetting Array Watch condition settings See authSetting Parameter Description
streamType String Live streaming method. client: Using streaming client or third-party push (regular); disk: Pseudo-live streaming;

authSetting Parameter Description

Parameter Type Description
channelId String Channel ID
rank Integer Used to set two watch conditions for one channel, value is 1 or 2
1: Primary condition
2: Secondary condition
userId String POLYV user ID, same as on the Polyv official website. Path: Official website -> Login -> Live (Development Settings)
globalSettingEnabled String Whether global settings are enabled
Y: Enabled
N: Disabled
enabled String Whether watch conditions are enabled
Y: Enabled
N: Disabled
authType String Watch condition type
none: No restrictions
code: Verification code watch
pay: Paid watch
phone: Whitelist watch
info: Registration watch
wxshare: Share watch
custom: Custom authorization watch
external: External authorization watch
payAuthTips String Paid watch prompt message
price Float Price for paid watch
watchEndTime Long Paid watch deadline, 13-digit millisecond timestamp. null means: one-time payment, permanently valid
validTimePeriod Integer Paid watch duration limit (days)
infoAuthTips String Registration watch prompt message
infoDesc String Registration watch description field
codeAuthTips String Verification code watch prompt message
authCode String Verification code for verification code watch
qcodeTips String QR code prompt for verification code watch
qcodeImg String QR code image for verification code watch
customKey String Key for custom authorization watch
customUri String API endpoint for custom authorization watch
externalKey String Key for external authorization watch
externalUri String API endpoint for external authorization watch
externalRedirectUri String Redirect URL when users directly access the watch page for external authorization
directKey String Independent authorization key
trialWatchEnabled String Trial watch switch
Y: Enable trial watch
N: Disable trial watch
trialWatchTime Integer Trial watch duration, in minutes
trialWatchEndTime Long Trial watch deadline, 13-digit millisecond timestamp. null means permanently valid for this channel
authTips String Whitelist watch prompt message
whiteListInputTips String Whitelist input prompt
whiteListEntryText String Whitelist entry text

Java Request Example

For quick integration of basic code, please 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 HttpUtil.java and LiveSignUtil.java 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 static final Logger log = LoggerFactory.getLogger(ChannelOperateTest.class);
/**
 * 查询所有频道的详细信息
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void testChannelDetailList() 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/detail/list";
    String keyword = "测试";
    String categoryId = "340019";
    String watchStatus = "unStart";
    String pageNumber = "2";
    String pageSize = "3";
    
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("categoryId", categoryId);
    requestMap.put("keyword", keyword);
    requestMap.put("watchStatus", watchStatus);
    requestMap.put("pageNumber", pageNumber);
    requestMap.put("pageSize", pageSize);
    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": "11208b877f3543af8b0e65a393031027.64.16427348530723753",
    "data": {
        "pageNumber": 2,
        "pageSize": 3,
        "totalPages": 2,
        "totalItems": 5,
        "contents": [
            {
                "channelId": 2779045,
                "name": "测试",
                "channelPasswd": "6dMuVz",
                "categoryId": 340019,
                "scene": "alone",
                "newScene": "alone",
                "template": "portrait_alone",
                "watchStatus": "unStart",
                "watchStatusText": "未开始",
                "sceneText": "纯视频(专业)",
                "watchUrl": "https://live.polyv.cn/watch/2779045",
                "content": "",
                "startTime": null,
                "pureRtcEnabled": "N",
                "channelLogo": "//liveimages.videocc.net/assets/wimages/pc_images/logo.png",
                "splashImg": "//liveimages.videocc.net/uploaded/images/2021/09/g2bta2pjbw.jpg",
                "splashEnabled": "Y",
                "publisher": "主持人",
                "authSetting": [
                    {
                        "channelId": 2779045,
                        "userId": "1b448be323",
                        "rank": 1,
                        "globalSettingEnabled": "N",
                        "enabled": "N",
                        "authType": "external",
                        "authTips": "欢迎观看本次直播",
                        "payAuthTips": "欢迎观看本次直播",
                        "codeAuthTips": "欢迎观看本次直播",
                        "infoAuthTips": "欢迎观看本次直播",
                        "authCode": "",
                        "qcodeTips": null,
                        "qcodeImg": null,
                        "price": 0.01,
                        "watchEndTime": null,
                        "validTimePeriod": null,
                        "customKey": "ujpTIPloEw",
                        "customUri": "",
                        "externalKey": "ujpTIPloEw",
                        "externalUri": "http://www.polyv.net",
                        "externalRedirectUri": "",
                        "externalEntryText": "登录观看",
                        "directKey": "ujpTIPloEw",
                        "trialWatchEnabled": "N",
                        "trialWatchTime": 1,
                        "trialWatchEndTime": null,
                        "whiteListInputTips": "请输入会员码-1605067278063",
                        "whiteListEntryText": "会员入口",
                        "infoDesc": ""
                    },
                    {
                        "channelId": 2779045,
                        "userId": "1b448be323",
                        "rank": 2,
                        "globalSettingEnabled": "N",
                        "enabled": "N",
                        "authType": "none",
                        "authTips": "欢迎观看本次直播",
                        "payAuthTips": "欢迎观看本次直播",
                        "codeAuthTips": "欢迎观看本次直播",
                        "infoAuthTips": "欢迎观看本次直播",
                        "authCode": null,
                        "qcodeTips": null,
                        "qcodeImg": null,
                        "price": 0,
                        "watchEndTime": null,
                        "validTimePeriod": null,
                        "customKey": "ujpTIPloEw",
                        "customUri": null,
                        "externalKey": "ujpTIPloEw",
                        "externalUri": null,
                        "externalRedirectUri": null,
                        "externalEntryText": "",
                        "directKey": "ujpTIPloEw",
                        "trialWatchEnabled": "N",
                        "trialWatchTime": null,
                        "trialWatchEndTime": null,
                        "whiteListInputTips": null,
                        "whiteListEntryText": "会员入口",
                        "infoDesc": null
                    }
                ]
            },
            {
                "channelId": 2779196,
                "name": "测试",
                "channelPasswd": "6dMuVz",
                "categoryId": 340019,
                "scene": "alone",
                "newScene": "alone",
                "template": "portrait_alone",
                "watchStatus": "unStart",
                "watchStatusText": "未开始",
                "sceneText": "纯视频(专业)",
                "watchUrl": "https://live.polyv.cn/watch/2779196",
                "content": "",
                "startTime": 1642453440000,
                "pureRtcEnabled": "N",
                "channelLogo": "//liveimages.videocc.net/assets/wimages/pc_images/logo.png",
                "splashImg": "//liveimages.videocc.net/uploaded/images/2021/09/g2bta2pjbw.jpg",
                "splashEnabled": "Y",
                "publisher": "主持人",
                "authSetting": [
                    {
                        "channelId": 2779196,
                        "userId": "1b448be323",
                        "rank": 1,
                        "globalSettingEnabled": "N",
                        "enabled": "N",
                        "authType": "external",
                        "authTips": "欢迎观看本次直播",
                        "payAuthTips": "欢迎观看本次直播",
                        "codeAuthTips": "欢迎观看本次直播",
                        "infoAuthTips": "欢迎观看本次直播",
                        "authCode": "",
                        "qcodeTips": null,
                        "qcodeImg": null,
                        "price": 0.01,
                        "watchEndTime": null,
                        "validTimePeriod": null,
                        "customKey": "ujpTIPloEw",
                        "customUri": "",
                        "externalKey": "ujpTIPloEw",
                        "externalUri": "http://www.polyv.net",
                        "externalRedirectUri": "",
                        "externalEntryText": "登录观看",
                        "directKey": "ujpTIPloEw",
                        "trialWatchEnabled": "N",
                        "trialWatchTime": 1,
                        "trialWatchEndTime": null,
                        "whiteListInputTips": "请输入会员码-1605067278063",
                        "whiteListEntryText": "会员入口",
                        "infoDesc": ""
                    },
                    {
                        "channelId": 2779196,
                        "userId": "1b448be323",
                        "rank": 2,
                        "globalSettingEnabled": "N",
                        "enabled": "N",
                        "authType": "none",
                        "authTips": "欢迎观看本次直播",
                        "payAuthTips": "欢迎观看本次直播",
                        "codeAuthTips": "欢迎观看本次直播",
                        "infoAuthTips": "欢迎观看本次直播",
                        "authCode": null,
                        "qcodeTips": null,
                        "qcodeImg": null,
                        "price": 0,
                        "watchEndTime": null,
                        "validTimePeriod": null,
                        "customKey": "ujpTIPloEw",
                        "customUri": null,
                        "externalKey": "ujpTIPloEw",
                        "externalUri": null,
                        "externalRedirectUri": null,
                        "externalEntryText": "",
                        "directKey": "ujpTIPloEw",
                        "trialWatchEnabled": "N",
                        "trialWatchTime": null,
                        "trialWatchEndTime": null,
                        "whiteListInputTips": null,
                        "whiteListEntryText": "会员入口",
                        "infoDesc": null
                    }
                ]
            }
        ]
    },
    "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "error": {
        "code": 10003,
        "desc": "时间戳过期"
    },
    "success": false
}
联系客服,在线咨询
在线咨询