Polyv Help Center

Help Center

Query Channel Page Menu Information

Updated: 2025-09-25 23:58:46

API Description

1、查询频道页面菜单信息
2、接口支持https协议

API URL

http://api.polyv.net/live/v3/channel/menu/list

<a href="/req.html?api=http://api.polyv.net/live/v3/channel/menu/list"" target="_blank">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 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 key used to generate the signature is critical for communication data security and must not be stored or used directly on the client. All APIs must be called through the customer's own server to relay requests to the POLYV server and obtain response data. See Signature Generation Rules
channelId true String Channel ID
lang false String Menu language type, defaults to Chinese
zh_CN: Chinese
EN: English

Example

http://api.polyv.net/live/v3/channel/menu/list?appId=frlr1zazn3&sign=DDB34065848210FB6E5FCE0AC10AAF88&channelId=2149813&timestamp=1621842637766

Response Parameter Description

Field Type Description
code Integer Response status code, 200 for success, non-200 for failure See Global Error Description
status String Response status text
message String Response description, provides error details when code is 400 or 500
data Object Menu list details on success See data field description

data Field Description

Parameter Type Description
menuId String Menu ID
menuType String Menu type
desc: Live stream introduction
chat: Interactive chat
quiz: Consultation Q&A
text: Text and image menu
iframe: Promotional external link
name String Menu name
ordered String Sort order
content String Content
lang String Menu language type
zh_CN: Chinese
EN: English
iframeOpenType String Open method (currentPage: current page, menuDisplay: menu display, newPage: new page) (This parameter is valid only when the menu type is external link promotion)
linkType Integer External link menu link type (10: General link, 11: Multi-platform link, default 10) (This parameter is valid only when the menu type is external link promotion)

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. 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 functionality integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pooling.

private static final Logger log = LoggerFactory.getLogger(MenuTest.class);
/**
 * 查询频道页面菜单信息
 * @throws IOException
 */
@Test
public void testChannelMenuList() 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/v3/channel/menu/list";
    String channelId = "2149813";

    //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 global error descriptions, see Global Error Description

Success Example

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": [{
        "menuId": "7694a2acd4",
        "menuType": "text",
        "name": "测试菜单aa",
        "ordered": 1,
        "content": "添加的测试内容aaa",
        "lang": "zh_CN"
    }, {
        "menuId": "971d1c8c0d",
        "menuType": "desc",
        "name": "直播介绍",
        "ordered": 2,
        "content": "直播测试内容bbb",
        "lang": "zh_CN"
    }, {
        "menuId": "c40aab816d",
        "menuType": "quiz",
        "name": "提问",
        "ordered": 3,
        "content": null,
        "lang": "zh_CN"
    }, {
        "menuId": "75ab4023e2",
        "menuType": "chat",
        "name": "互动聊天",
        "ordered": 4,
        "content": "",
        "lang": "zh_CN"
    }]
}

Error Example

{
    "code": 400,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}
联系客服,在线咨询