Modify 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/update
Request Method
POST
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. API calls have frequency 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 within 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 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 |
| menuId | true | String | Menu ID (menu IDs for interactive chat or consultation Q&A cannot be set). This parameter is obtained from Query Channel Page Menu Information |
| content | true | String | Menu content |
| lang | false | String | Menu language type, default is Chinese zh_CN: Chinese EN: English |
| iframeOpenType | false | 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 | false | Integer | External link promotion 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. |
Example
http://api.polyv.net/live/v3/channel/menu/update
Form parameters:
appId=frlr1zazn3&sign=AC442FBE7BC6939D3F0CD9C4322DBB68&menuId=7694a2acd4&channelId=2149813&content=%E6%B7%BB%E5%8A%A0%E7%9A%84%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9aaa×tamp=1621842830447
Response Parameter Description
| Parameter | 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 auxiliary error reason when code is 400 or 500 |
| data | String | Returns "success" on success, empty on error |
Java Request Example
For quick integration of the base code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own project source code. The 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 pools.
private static final Logger log = LoggerFactory.getLogger(MenuTest.class);
/**
* 依修改页面菜单信息
* @throws IOException
*/
@Test
public void testUpdateChannelMenu() 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/update";
String channelId = "2149813";
String menuId = "7694a2acd4";
String content = "添加的测试内容aaa";
//http 调用逻辑
Map<String,String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp",timestamp);
requestMap.put("channelId",channelId);
requestMap.put("menuId",menuId);
requestMap.put("content",content);
requestMap.put("sign",LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.postFormBody(url, requestMap);
log.info("测试修改页面菜单信息接口返回值:{}",response);
//do somethings
}
Response Example
For system global error descriptions, see Global Error Description
Success example
{
"code": 200,
"status": "success",
"message": "",
"data": "success"
}
Error example
{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}
