Query Default Template Content Protection (Screen Recording Prevention) Settings
Updated: 2026-01-28 18:55:12
API Description
1、查询内容保护默认模板设置
2、接口支持https协议
API URL
http://api.polyv.net/live/v4/user/template/marquee/get
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended to ensure API security. API calls have frequency limits. See details
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId See Get Secret Key |
| 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 never be 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 |
| timestamp | true | String | Current 13-digit millisecond timestamp, valid for 3 minutes |
Example
http://api.polyv.net/live/v4/user/template/marquee/get?appId=frlr1zazn3&sign=87880969ED4E9887C482704832066F84×tamp=1677166871700
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Status code, same as HTTP status code, used to determine the basic response status |
| data | Object | Template-marquee response object See Data Parameter Description |
| error | Object | Error information when status code is not 200 See Error Parameter Description |
| requestId | String | Request ID, a unique UUID generated for each request, only used for troubleshooting and debugging, not to be associated with business logic |
| status | String | Response result, determined by business logic. Returns success on success, error on failure |
| success | Boolean | Whether the response was successful |
Data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| enable | String | Content protection switch Y: Enabled N: Disabled |
| antiRecordType | String | Content protection method marquee: Marquee watermark: Watermark |
| modelType | String | Content protection type fixed: Fixed nickname: Username diyurl: URL custom setting |
| autoZoomEnabled | String | Custom zoom switch Y: Enabled N: Disabled |
| content | String | Set content for fixed value URL for URL custom setting |
| opacity | Integer | Transparency Marquee transparency, range 0-99 Watermark transparency, range 0-100 |
| doubleEnabled | String | Dual marquee switch Y: Enabled N: Disabled |
| fontColor | String | Marquee font color, color value, e.g., #FFFFFF |
| fontSize | String | Font size When content protection method is marquee: set a value, range 1-256 When content protection method is watermark: small: Small middle: Medium large: Large |
| showMode | String | Marquee display mode roll: Scrolling flicker: Flashing |
Error Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Error code, used to determine the specific error reason |
| desc | String | Error description, corresponding to error.code |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source code project. 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 integration. The Live Java SDK provides unified packaging and optimization for API call logic, exception handling, data signing, and HTTP request thread pooling.
private static final Logger log = LoggerFactory.getLogger(getClass());
/**
* 查询内容保护默认模板设置
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void getMarqueeTemplateTest() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v4/user/template/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
}
Response Example
For system-wide error descriptions, see Global Error Descriptions
Success Example
{
"code": 200,
"status": "success",
"requestId": "a5e9b1d15f544d7a9db6f038156a851d.73.16771668735691381",
"data": {
"enable": "Y",
"antiRecordType": "marquee",
"modelType": "fixed",
"content": "测试跑马灯内容",
"fontSize": "20",
"fontColor": "#ff4d4f",
"opacity": 80,
"showMode": "flicker",
"doubleEnabled": "N",
"autoZoomEnabled": "Y"
},
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
"error": {
"code": 20001,
"desc": "application not found."
},
"success": false
}
