Query Channel Content Protection (Anti-Screen Recording Info)
Updated: 2026-01-28 18:46:53
Interface Description
1、通过频道号,查询频道内容保护(防录屏信息)
2、接口支持https协议
Interface URL
http://api.polyv.net/live/v3/channel/anti/record/get
<a href="/req.html?api=http://api.polyv.net/live/v3/channel/anti/record/get"" target="_blank">Online API Call
Request Method
GET
Interface Constraints
- The interface supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. Interface 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 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 saved 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 | false | String | Channel ID If a channel ID is provided, query the channel's content protection info. If no channel ID is provided, query the account's default content protection template. |
Example
http://api.polyv.net/live/v3/channel/anti/record/get?appId=frlr1zazn3&sign=879C66B1CF3AB6C8536294E33D492C53&channelId=2453970×tamp=1629968257454
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code. 200 indicates success, non-200 indicates failure. See global error description |
| status | String | Response status text |
| message | String | Response description. When code is 400 or 500, provides auxiliary error reason. |
| data | Object | On success, returns channel content protection info. See data field description |
data Field Description
| Parameter | Type | Description |
|---|---|---|
| antiRecordType | String | Content protection method marquee: Marquee watermark: Watermark |
| modelType | String | Content protection type fixed: Fixed value nickname: Login username diyurl: Custom URL setting |
| content | String | For fixed value, the set content. For custom URL setting, the URL. |
| opacity | Integer | Opacity |
| fontSize | String | Font size When protection method is marquee, set a value from 1-256. When protection method is watermark: small: Small middle: Medium large: Large |
| fontColor | String | Marquee font color (color value). Not returned for watermark. |
| autoZoomEnabled | String | Marquee custom zoom. Not returned for watermark. Y: Enabled N: Disabled |
| doubleEnabled | String | Dual marquee. Not returned for watermark. Y: Enabled N: Disabled |
| showMode | String | Marquee display mode. Not returned for watermark. roll: Scrolling flicker: Flashing |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code. Click to download source code. After downloading, add it to your own source project. The test cases include HttpUtil.java and LiveSignUtil.java, both contained in the download file.
It is strongly recommended to use the Live Java SDK for API 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(MarqueeTest.class);
/**
* 查询频道内容保护
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void marqueeGetTest() 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/anti/record/get";
String channelId = "2453970";
//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 system error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"message": "",
"data": {
"antiRecordType": "marquee",
"modelType": "fixed",
"content": "test",
"opacity": 80,
"fontSize": "20",
"fontColor": "#FFF",
"autoZoomEnabled": "Y",
"doubleEnabled": "N",
"showMode": "flicker"
}
}
Error Example
{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}
