Polyv Help Center

Help Center

Modify Channel Callback Settings

Updated: 2026-04-24 09:28:34

API Description

1、修改频道回调设置接口
2、如频道需要跟随用户设置,可以调用设置频道默认项开关接口
3、接口支持https协议

API URL

http://api.polyv.net/live/v3/channel/callback/update-setting

Online API Call

Request Method

POST

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls are subject to rate limits. See details

Request Parameters

Parameter Name Required Type Description
appId true String Account appId See Get Secret Key
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 for signature generation is critical for communication data security. It must never be saved or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server and retrieve response data. See Signature Generation Rules
channelId true String Channel ID
recordCallbackVideoType false String Recording callback file type. Optional values: m3u8, mp4, or m3u8,mp4
recordCallbackUrl false String Recording callback HTTP(S) address, needs URL encoding. Pass an empty string to clear the setting
playbackCallbackUrl false String Playback success callback HTTP(S) address, needs URL encoding. Pass an empty string to clear the setting
streamCallbackUrl false String Stream status callback HTTP(S) address, needs URL encoding. Pass an empty string to clear the setting
pptRecordCallbackUrl false String Courseware remake success callback HTTP(S) address, needs URL encoding. Pass an empty string to clear the setting
liveScanCallbackUrl false String Live content moderation callback HTTP(S) address, needs URL encoding. Pass an empty string to clear the setting
playbackCacheCallbackUrl false String Playback cache callback HTTP(S) address, needs URL encoding. Pass an empty string to clear the setting
subtitleCallbackUrl false String (Planned, expected support in 2025Q2) Subtitle generation callback HTTP(S) address, needs URL encoding. Pass an empty string to clear the setting
liveViolationCutoffCallbackUrl false String Live violation cutoff callback HTTP(S) address, needs URL encoding. Pass an empty string to clear the setting
customBookingCallbackUrl false String Live stream audience booking callback HTTP(S) address, needs URL encoding. Pass an empty string to clear the setting

Example

http://api.polyv.net/live/v3/channel/callback/update-setting

Form Parameters:

pptRecordCallbackUrl=&playbackCacheCallbackUrl=&recordCallbackUrl=http%3A%2F%2Fcallback.polyv.net%2Ftest%3Fcallback%3Dtrue&appId=frlr1zazn3&sign=EBA8303B5004D82010C62089727E34C0&streamCallbackUrl=&recordCallbackVideoType=m3u8&playbackCallbackUrl=&liveScanCallbackUrl=&channelId=2191569&timestamp=1621840010962

Response Parameters

Parameter Name 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 additional error details
data String Returns empty on success

Java Request Example

For quick integration of the base code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source project. The test cases include HttpUtil.java and LiveSignUtil.java in the downloaded package.

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(ChannelOperateTest.class);
/**
 * 修改回调设置
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void testUpdateSetting() throws IOException, NoSuchAlgorithmException {
    //公共参数,填写自己的实际
    String appId = super.appId;
    String appSecret = super.appSecret;
    String userId = super.userId;
    String timestamp = String.valueOf(System.currentTimeMillis());
    //业务参数
    String url="https://api.polyv.net/live/v3/channel/callback/update-setting";
    String channelId="2191569";
    String recordCallbackVideoType="m3u8";
    String recordCallbackUrl="http://callback.polyv.net/test?callback=true";
    String playbackCallbackUrl="";
    String streamCallbackUrl="";
    String pptRecordCallbackUrl="";
    String liveScanCallbackUrl="";
    String playbackCacheCallbackUrl="";
    String liveViolationCutoffCallbackUrl="";

    //http 调用逻辑
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("channelId", channelId);
    requestMap.put("recordCallbackVideoType", recordCallbackVideoType);
    requestMap.put("recordCallbackUrl", recordCallbackUrl);
    requestMap.put("playbackCallbackUrl", playbackCallbackUrl);
    requestMap.put("streamCallbackUrl", streamCallbackUrl);
    requestMap.put("pptRecordCallbackUrl", pptRecordCallbackUrl);
    requestMap.put("liveScanCallbackUrl", liveScanCallbackUrl);
    requestMap.put("playbackCacheCallbackUrl", playbackCacheCallbackUrl);
    requestMap.put("liveViolationCutoffCallbackUrl", liveViolationCutoffCallbackUrl);
    requestMap.put("customBookingCallbackUrl", customBookingCallbackUrl);
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
    String response = HttpUtil.postFormBody(url, requestMap);
    log.info("测试修改回调设置,返回值:{}", response);
    //do somethings

}

Response Example

For system-wide global error descriptions, see Global Error Description

Success Example

{
    "code":200,
    "status":"success",
    "message":"",
    "data":""
}

Error Example

{
    "code": 400,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}
联系客服,在线咨询