Polyv Help Center

Help Center

Set Player Custom URL Marquee

Updated: 2026-01-28 18:58:52

API Description

1、通过接口可以设置播放器内容保护自定义url跑马灯开关,在开启时需提交url参数。
2、接口URL中的{channelId}为 频道ID
3、接口支持https协议

API URL

http://api.polyv.net/live/v2/channelRestrict/{channelId}/set-diyurl-marquee

Request Method

GET, POST

For details, refer to Custom URL Marquee.

Supported Format

JSON

Request Limit

TRUE

Request Parameters

Parameter Required Type Description
appId Yes string Obtained from API settings, the appId registered in the live streaming system
timestamp Yes string Current 13-digit millisecond timestamp, valid for 3 minutes
marqueeRestrict Yes Y or N Custom URL content protection marquee toggle
url Yes string Custom URL, can be empty when toggle is off, required when toggle is on
sign Yes string Signature, 32-bit uppercase MD5 value

Successful Response JSON Example:

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": "设置成功"
}

Failed Response JSON Example:

No appId entered

{
    "code": 400,
    "status": "error",
    "message": "appId not found.",
    "data": ""
}

Incorrect appId

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}

Timestamp error

{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}

Signature error

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

Channel number error

{
    "code": 400,
    "status": "error",
    "message": "channel not found.",
    "data": ""
}

Marquee toggle error

{
    "code": 400,
    "status": "error",
    "message": "marqueeRestrict is wrong",
    "data": ""
}

Custom URL not submitted when marquee toggle is on

{
    "code": 400,
    "status": "error",
    "message": "url is required",
    "data": ""
}

Other cases

{
    "code": 400,
    "status": "error",
    "message": "设置失败",
    "data": ""
}

Field Description

Parameter Description
code Request result code, 200 for success
status Request result, "success" for success, "error" for failure
message Error message, empty on success, error message on failure

PHP Request Example

<?php

//引用config.php
include 'config.php';

//接口需要的参数(非sign)赋值
$channelId = "127075";
$marqueeRestrict = "Y";
$url = "http://demo.ipolyv.cn/wfy/marquee.php";

$params = array(
    'appId'=>$appId,
    'url'=>$url,
    'marqueeRestrict'=>$marqueeRestrict,
    'timestamp'=>$timestamp
  );

//生成sign
$sign = getSign($params); //详细查看config.php文件的getSign方法

//接口请求url
$url = "http://api.polyv.net/live/v2/channelRestrict/$channelId/set-diyurl-marquee?appId=$appId&timestamp=$timestamp&sign=$sign&url=$url&marqueeRestrict=$marqueeRestrict";

//输出接口请求结果
echo file_get_contents($url);

?>

Signature Rules (See config.php file code)

Signature Generation Rules

联系客服,在线咨询
在线咨询