1、修改授权播放和防录屏跑马灯接口设置
2、接口支持https协议
http://api.polyv.net/vod/v4/user/setting/marquee/update
https://api.polyv.net/vod/v4/user/setting/marquee/update?appId=frlr1zazn3×tamp=1669907987000&sign=B069F28B9D21182D3E235E220F9E1F92&marqueeUrl=https://my.polyv.net/test
强烈建议您使用直播Java SDK完成API的功能对接,直播Java SDK 对API调用逻辑、异常处理、数据签名、HTTP请求线程池进行了统一封装和优化。
private static final Logger log = LoggerFactory.getLogger(getClass());
/**
* 修改授权播放和防录屏跑马灯接口
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void updateMarqueeTest() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/vod/v4/user/setting/marquee/update";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("marqueeUrl", "https://my.polyv.net/testmarqueeurl");
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",
"requestId": "5399ad2d29ab48c88165d8ffa4f0b4a4.69.16699079874310089",
"data": true,
"success": true
}
{
"code": 400,
"status": "error",
"error": {
"code": 10003,
"desc": "时间戳过期"
},
"success": false
}