更新聊天审核开关
接口描述
1、更新聊天审核开关
2、接口支持https协议接口URL
https://api.polyv.net/live/v3/channel/chat/update-censor-enabled请求方式
POST接口约束
请求参数描述
参数名
必选
类型
说明
示例
响应参数描述
名称
类型
说明
Java请求示例
响应示例
Last updated
1、更新聊天审核开关
2、接口支持https协议https://api.polyv.net/live/v3/channel/chat/update-censor-enabledPOSTLast updated
http://api.polyv.net/live/v3/channel/chat/update-censor-enabled?appId=frlr1zazn3&sign=FD701BFA3DCE2C7DCC362A904DBF48B0×tamp=1636536555144&channelId=3335806&enabled=Yprivate static final Logger log = LoggerFactory.getLogger(getClass());
@Test
public void testUpdateCensorEnabled() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v3/channel/chat/update-censor-enabled";
String channelId = "3335806";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("channelId", channelId);
requestMap.put("enabled", "Y");
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
url = HttpUtil.appendUrl(url, requestMap);
String response = HttpUtil.postFormBody(url, null);
log.info("测试更新聊天审核开关:{}", response);
//do somethings
}{
"code": 200,
"status": "success",
"message": "",
"data": false
}{
"code": 403,
"status": "error",
"message": "invalid signature.",
"data": null
}