Query Channel Kick List
Updated: 2022-09-02 18:08:07
API Description
1、通过频道号,查询踢人列表
2、接口支持https协议
API URL
http://api.polyv.net/live/v3/channel/chat/list-kicked
Request Method
POST
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. API calls have frequency limits. See details
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId See Get 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. All APIs must be called through the customer's own server to relay requests to the POLYV server to obtain response data. See Signature Generation Rules |
| channelId | true | String | Channel ID |
Example
http://api.polyv.net/live/v3/channel/chat/list-kicked
Form Parameters:
appId=frlr1zazn3&sign=815A35BC0A4666E4BC14FB04A8C55D82&channelId=2191569×tamp=1616640471944
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code, 200 for success, non-200 for failure See Global Error Description |
| status | String | Response status text |
| message | String | Response description message, provides error details when code is 400 or 500 |
| data | Array | Paginated data of kicked users See data field description |
data Field Description
| Parameter | Type | Description |
|---|---|---|
| banned | Boolean | Whether muted |
| channelId | String | Channel ID |
| clientIp | String | User IP |
| nick | String | Nickname |
| param4 | String | Custom parameter param4 |
| pic | String | Avatar image URL |
| roomId | String | Room ID |
| uid | String | Chat room socket ID |
| userId | String | User userId |
| userType | String | User role manager: Admin teacher: Instructor assistant: Teaching Assistant guest: Guest viewer: Participant slice/student: Viewer |
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. 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 encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.
private static final Logger log = LoggerFactory.getLogger(ChatBannedTest.class);
/**
* 查询频道踢人列表
* @throws IOException
*/
@Test
public void testGetChannelKickedUserList() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v3/channel/chat/list-kicked";
String channelId = "2191569";
//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));
String response = HttpUtil.postFormBody(url, requestMap);
log.info("测试查询频道踢人列表接口返回值:{}",response);
}
Response Example
For system global error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"message": "",
"data": [
{
"banned": true,
"channelId": "2191569",
"clientIp": "59.41.20.74",
"nick": "卉",
"param4": "oi_ubswUnFt8QQFAAEJbKmd8W9BE",
"pic": "https://thirdwx.qlogo.cn/mmopen/vi_32/3lMXVJoLMLJibnkFuA23lyqj5MOQufhW5ATvHuB8byssutficHKU0u7OMx5OQgg9WNVuHf44AXfbAMMAZejuYFTg/132",
"roomId": "2191569",
"uid": "xw5hNBg77lGOcx5fADoX",
"userId": "ovtl9t_RxnrTdqkXqkT5Q5lnxp2A",
"userType": "slice"
}
]
}
Error Example
{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}
