Polyv Help Center

Help Center

Batch Associate Sub-venues

Updated: 2025-03-12 09:34:00

Interface Description

1、批量关联分会场
2、(channelId, timestamp, appId)参与sign签名,并和sign一起通过url传递,请求体参数不参与签名,通过post请求体传递【请设置请求头contentType:application/json】
3、接口支持https协议

Interface URL

http://api.polyv.net/live/v3/channel/multi-meeting/batch-save-submeeting

Request Method

POST

Interface Constraints

  1. The interface supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. Interface calls have frequency limits. See details

  2. Supports associating up to 60 sub-venue channels.

Request Parameter Description

Parameter Required Type Description
appId true String Account appId See details for obtaining secret key
timestamp true Long Current 13-digit millisecond timestamp, valid within 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. 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 obtain response data. See details for signature generation rules
channelId true String Main venue channel number

Request Body Parameter Description

Parameter Required Type Description
channelId false Integer Main venue channel ID
subChannels true Array Array of sub-venue objects, refer to the field description below

subChannels Field Description

Parameter Required Type Description
channelId true Integer Sub-venue channel ID
name false String Sub-venue name, defaults to the channel name if empty

Example

http://api.polyv.net/live/v3/channel/multi-meeting/batch-save-submeeting?appId=frlr1zazn3&sign=D02FA683640135D843D485EE84F6632A&channelId=2588188&timestamp=1632809855078

Request body JSON parameters:

{
  "channelId":54402322,
  "subChannels":[
    {"channelId" : 54452432,
      "name" : "submeeting-1"
    },
    {"channelId" : 55233129,
      "name" : "submeeting-2"
    }
  ]
}

Response Parameter Description

Parameter Type Description
code Integer Response status code, 200 for success, non-200 for failure See details for global error description
status String Response status text
message String Response description, provides error details when code is 400 or 500
data Array Array of successfully created sub-venue channels

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 code project. The HttpUtil.java and LiveSignUtil.java used in the test cases are included in the downloaded file.

    @Test
    public void testBatchSaveSubmeetingChannel() 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/multi-meeting/batch-save-submeeting";
        String channelId = "2588188";
        
        //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));
        url = HttpUtil.appendUrl(url,requestMap);

        String json = "{\"channelId\":54402322,\"subChannels\":[{\"channelId\" : 544524332,\"name\" : \"submeeting-1\" },{\"channelId\" : 552334129,\"name\" : \"submeeting-2\"}]}";
        String response = HttpUtil.postJsonBody(url, json,null);
        log.info("测试批量关联分会场,返回值:{}", response);
    }

Response Example

Success Example

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": [1283733,322333]
}

Error Example

{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}
{
    "code": 400,
    "status": "error",
    "message": "channel multi meeting limit",
    "data": ""
}
联系客服,在线咨询