1、查询授权播放和防录屏跑马灯接口设置
2、接口支持https协议
http://api.polyv.net/vod/v4/user/setting/marquee/get
https://api.polyv.net/vod/v4/user/setting/marquee/get?appId=frlr1zazn3×tamp=1669907914000&sign=39F093743F80C39280ED9EC88677B0BD
强烈建议您使用直播Java SDK完成API的功能对接,直播Java SDK 对API调用逻辑、异常处理、数据签名、HTTP请求线程池进行了统一封装和优化。
private static final Logger log = LoggerFactory.getLogger(getClass());
/**
* 查询授权播放和防录屏跑马灯接口
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void getMarqueeTest() 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/get";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
log.info("测试查询授权播放和防录屏跑马灯接口设置:{}", response);
//do somethings
}
{
"code": 200,
"status": "success",
"requestId": "5399ad2d29ab48c88165d8ffa4f0b4a4.66.16699080023060091",
"data": {
"marqueeUrl": "https://my.polyv.net/test"
},
"success": true
}
{
"code": 400,
"status": "error",
"error": {
"code": 10003,
"desc": "时间戳过期"
},
"success": false
}