List of Banned Users Across All Platforms
Updated: 2024-01-09 11:19:56
API Description
1、全平台(账号下)封禁的聊天室用户列表(包括禁言、踢人等)
2、接口支持https协议
API URL
http://api.polyv.net/live/v4/chat/forbid/list
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId See details on obtaining keys |
| 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 not 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 for response data. See signature generation rules |
| viewerId | false | String | Viewer ID |
| nickName | false | String | Viewer nickname |
| pageNumber | false | Integer | Page number, default is 1 |
| pageSize | false | Integer | Page size, default is 10, maximum is 1000 |
Example
http://api.polyv.net/live/v4/chat/forbid/list?appId=fso8gzbxlr×tamp=1621675923000&pageNumber=1&pageSize=10&sign=88929522E99A082046519B7CF264D76C
Response Parameters
| 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, provides error details when code is 400 or 500 |
| data | Array | Muted user data See data field description |
data Field Description
| Parameter | Type | Description |
|---|---|---|
| pageNumber | Integer | Current page number |
| pageSize | Integer | Records per page |
| totalItems | Integer | Total pages |
| contents | Array |
List of banned users (including muted and kicked users) |
contents Field Description
| Parameter | Type | Description |
|---|---|---|
| nickName | String | User nickname |
| viewerId | String | User ID |
| banned | String | Whether muted, Y for yes, N for no |
| kicked | String | Whether kicked, Y for yes, N for no |
| operationTime | Long | Operation timestamp (13 digits) |
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 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 pools.
private static final Logger log = LoggerFactory.getLogger(ChatBannedTest.class);
/**
* 查询全平台封禁用户列表
* @throws IOException
*/
@Test
public void testForbidUserList() 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/chat/forbid/list";
String page = String.valueOf(1);
String size = String.valueOf(10);
//http 调用逻辑
Map<String,String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp",timestamp);
requestMap.put("pageNumber",page);
requestMap.put("pageSize",size);
requestMap.put("sign",LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
log.info("查询全平台封禁用户列表接口返回值:{}",response);
}
Response Example
For global error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"message": "",
"data": {
"pageSize": 10,
"pageNumber": 1,
"totalItems": 2,
"contents": [
{
"nickName": "造数据用户3328",
"viewerId": "618948782650200",
"operationTime": 1693980442776,
"banned": "Y",
"kicked": "Y"
},
{
"nickName": "数字房间号-造数据用户3364",
"viewerId": "618964027359200",
"operationTime": 1693980442771,
"banned": "Y",
"kicked": "Y"
}
]
}
}
Error Example
{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}
