Query Check-in Records Initiated in a Channel Within a Specified Time Range
Updated: 2024-07-04 18:35:41
API Description
1、通过指定时间范围查询签到发起记录
2、接口支持https协议
API URL
http://api.polyv.net/live/v3/channel/chat/get-checkin-list
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended to ensure 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 not 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 and obtain response data. See Signature Generation Rules |
| channelId | true | String | Channel ID |
| startDate | true | String | Start date, format yyyy-MM-dd. The start and end dates must be within 30 days. |
| endDate | true | String | End date, format yyyy-MM-dd |
Example
http://api.polyv.net/live/v3/channel/chat/get-checkin-list?startDate=2024-07-04&endDate=2024-07-04&channelId=4872391×tamp=1720088526000&appId=fso8gzbxlr&sign=273F4471BF9FF34DB7AB92EC943AE94F
Response Parameter Description
| Parameter | 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 | Array | Check-in record data. See data field description |
data Field Description
| Parameter | Type | Description |
|---|---|---|
| sessionId | String | Session ID |
| roomid | String | Room ID |
| checkinid | String | Check-in ID, one ID per check-in session |
| createtime | String | Check-in time |
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 packaging and optimization for API call logic, exception handling, data signing, and HTTP request thread pooling.
private static final Logger log = LoggerFactory.getLogger(InteractionCheckinTest.class);
/**
* 查询频道发起的签到记录
* @throws IOException
*/
@Test
public void testGetCheckinBySessionId() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "https://api.polyv.net/live/v3/channel/chat/get-checkin-list";
String channelId = "4872391";
String sessionId = "fso8gzbxlr";
//http 调用逻辑
Map<String,String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp",timestamp);
requestMap.put("channelId",channelId);
requestMap.put("startDate","2024-07-04");
requestMap.put("endDate","2024-07-04");
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": [
{
"limitTime": 30,
"number": 1,
"createtime": "2024-07-04 10:36:59",
"checkinid": "49d80000-39ae-11ef-9cfa-81a09e",
"indate": "2024-07-04",
"sessionId": null,
"mainCheckinId": null,
"roomid": "4872391",
"checknumber": 1
},
{
"limitTime": 30,
"number": 1,
"createtime": "2024-07-04 10:37:34",
"checkinid": "5e84d0f0-39ae-11ef-9cfa-81a09e",
"indate": "2024-07-04",
"sessionId": null,
"mainCheckinId": null,
"roomid": "4872391",
"checknumber": 0
}
]
}
Error Example
{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}
