Batch Query Presenter Information Interface
Updated: 2026-01-04 08:31:28
Interface Description
1、批量查询主讲信息接口
2、接口支持https协议
Interface URL
http://api.polyv.net/live/v4/channel/account/teacher-list
<a href="/req.html?api=http://api.polyv.net/live/v4/channel/account/teacher-list"" target="_blank">Online API Call
Request Method
POST
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: 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 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: Signature Generation Rules |
Request Body Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| channelIds | true | Array | List of channel IDs |
Example
http://api.polyv.net/live/v4/channel/account/teacher-list?appId=fso8gzbxlr&sign=386B2A96BE453F70FD9071A5190890B8×tamp=1721290785000
Request body JSON parameters:
{
"channelIds": [12345678]
}
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Status code, same as HTTP status code, used to determine the basic response status |
| status | String | Response result, determined by the business. Returns "success" on success, "error" on failure |
| success | Boolean | Whether the response was successful |
| requestId | String | Request ID, a unique UUID generated for each request. Only used for troubleshooting and debugging, should not be tied to business logic |
| error | Object | Error information when status code is not 200 See details: Error Field Description |
| data | Array | List of presenter information See details: Data Field Description |
Error Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Error code, used to determine the specific error reason |
| desc | String | Error description, corresponds to error.code |
Data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| channelId | Integer | Channel ID |
| passwd | String | Presenter password |
| userId | String | Presenter user ID |
| nickname | String | Presenter nickname |
| customTeacherId | String | Custom presenter ID |
| actor | String | Presenter identifier |
| avatar | String | Presenter avatar URL |
| globalSettingEnabled | String | Global settings toggle: Y - enabled, N - disabled |
| notifyEnabled | String | Announcement feature toggle: Y - enabled, N - disabled |
| checkinEnabled | String | Check-in feature toggle: Y - enabled, N - disabled |
| voteEnabled | String | Voting feature toggle: Y - enabled, N - disabled |
| lotteryEnabled | String | Lottery feature toggle: Y - enabled, N - disabled |
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 test cases include HttpUtil.java and LiveSignUtil.java in the downloaded 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 pooling.
private static final Logger log = LoggerFactory.getLogger(getClass());
/**
* 批量查询主讲信息接口
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void listTeacherTest() 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/channel/account/teacher-list";
List<Integer> channelIds = Arrays.asList(7198276);
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
Map<String, Object> jsonMap = new HashMap<>();
jsonMap.put("channelIds", channelIds);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
url = HttpUtil.appendUrl(url, requestMap);
String response = HttpUtil.postJsonBody(url, JSON.toJSONString(jsonMap), null);
log.info("测试批量查询主讲信息接口成功:{}", response);
//do somethings
}
Response Example
For system-wide error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"requestId": "7b1c35ad-1b22-4d19-978c-d12dd9643a74",
"data": [
{
"channelId": 12345678,
"passwd": "12345678",
"userId": "12345678",
"nickname": "12345678",
"customTeacherId": "",
"actor": "456",
"avatar": "https://liveimages.videocc.net/uploaded/images/2025/10/12345678.jpg",
"globalSettingEnabled": "N",
"notifyEnabled": "N",
"checkinEnabled": "N",
"voteEnabled": "N",
"lotteryEnabled": "N"
}
],
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
"error": {
"code": 20001,
"desc": "application not found."
},
"success": false
}
