Live Room Personnel Status Callback Notification
Purpose
For institutions, it is necessary to know in near real time whether students and teachers have entered the classroom at the specified time. If not, students need to be notified by phone to attend class. With this feature, after the personnel status in a channel live room under the account changes, the server will submit a POST request to the callback interface address configured by the customer to notify the user-defined callback interface.
Parameters included in the callback (requested via form-data parameters):
| Parameter Name | Type | Description |
|---|---|---|
| logList | string | JSON format of an object array |
| timestamp | number | Current timestamp |
| sign | string | Signature verification. Add polyvlog before and after, with the key and value of the data in between. Sort the key values alphabetically from smallest to largest. After MD5 encoding, convert to uppercase. For example, if the parameters are {roomId:'200060', channelId:'005200060',user:{nick:'yang'}}, the signature is md5/('polyvlog'+'channelId'+'005200060'+'roomId'+'200060'+'user'+JSON.stringify({nick:'yang'})+'polyvlog').toLocaleUpperCase();'} |
Notes
- The callback aggregates data within 1 minute and sends it in a single callback.
- Both the new and old consoles are supported.
- Because callbacks are relatively frequent and may put pressure on the customer's server, communicate with the customer in advance.
- The interface returns a JSON object containing a
codefield. 200 indicates success. If 200 is not returned, it will retry 3 times; after more than 3 times, the log will be discarded.
logList Parameter JSON Object Array Format
| Parameter Name | Type | Description |
|---|---|---|
| channelId | string | Channel ID |
| groupId | string | Group ID, optional |
| viewerId | string | Participant ID |
| nickName | string | User nickname |
| logType | number | Log type. 21: Mic connection successful (mic on), 22: End mic connection (mic off), 31: Start demo, 32: End demo, 11: Enter live room, 12: Exit live room, 41: Class starts, 42: Class ends, 101: List of students in the live room during class, 102: List of students in the live room when class ends |
| interactType | string | Enum corresponding to the log type (recommended to use logType directly). login: enter live room, diconnect: exit live room, startClass: class starts or list of students in the live room during class, finishClass: class ends or list of students in the live room when class ends |
| logTime | number | Log timestamp |
| ipAddress | string | IP address, optional |
| userAgent | string | UA information, optional |
| referer | string | Referer information - request source, optional |
| viewerCount | number | Current number of participants |
| timestamp | number | 13-digit millisecond timestamp |
| sessionId | string|null | Current session |
| userOrigin | string | User source, optional |
| content | string | When logType is 101 or 102, indicates the OSS address of the student list. The student list information can be obtained from this address. The returned data format of the list is the same as the logList format |
| role | string | User identity information. teacher: lecturer, guest: guest, slice: cloud classroom viewer, viewer: regular viewer, student: regular viewer, assistant: teaching assistant, attendee: host or participant in a webinar scenario, listener: viewer in a webinar scenario |
| inClass | number | Whether the channel is live. 1 indicates live, 2 indicates not live. This field does not exist in some callbacks |
How to Set Up
Set up through the console:
Log in to the account - click [Settings] - under [Development Settings], click [Callbacks and APIs] - find [Live Room Personnel Status Callback URL] and enter the callback address.
Note: The submitted interface address must start with http:// or https://.
Console Settings Reference Images
New console settings:

Old console settings:

If you cannot find the corresponding settings, it may be due to insufficient account permissions. If you need help, please contact the online customer service in the lower right corner.
