Room destroyed Callback
Description
When developers need to know information about when a Room is destroyed, they can obtain it through this Callback.
Callback description
- Request method: POST.
The Callback data format is JSON. You need to perform UrlDecode decoding on it.
- Request address: Please configure the Callback address on the ZEGO Console.
- Transfer protocol: HTTPS/HTTP. HTTPS is recommended.
Callback parameters
| Common parameters | Type | Description |
|---|---|---|
| event | String | Callback event. The Callback return value for this is room_close. |
| appid | UInt32 | Unique identifier of the APP. |
| timestamp | Int64 | Server current time, Unix timestamp, unit: seconds. |
| nonce | String | Random number. |
| signature | String | Verification string. For details, see Verification Description. |
| Business parameters | Type | Description |
| room_id | String | Room ID. |
| room_session_id | UInt64 | Unique identifier of the Room lifecycle, which remains unchanged throughout the Room's lifecycle. This parameter is consistent with the parameter room_seq in the User logged into Room Callback and User logged out of Room Callback. |
| close_reason | UInt32 | Reason for Room destruction.
|
| room_close_time | String | Room destruction time, which is the server current time, Unix timestamp, unit: milliseconds. |
It is recommended that you convert some parameters to Int for logical processing. Related fields include room_close_time.
Data example
{
"event": "room_close",
"appid": 1,
"timestamp": 1499676989,
"nonce": "350176",
"signature": "signature",
"room_id": "rid_1242649",
"room_session_id": 858012925204410400,
"close_reason": 1,
"room_close_time": "1499676989909"
}Return response
Return HTTP status code 2XX (e.g., 200) indicates success, and other responses indicate failure.
Callback retry strategy
If the ZEGO server does not receive a response, or the received HTTP status code is not 2XX (e.g., 200), it will attempt to retry, up to 5 retries. The interval between each retry request and the last request is 2s, 4s, 8s, 16s, and 32s respectively. If the 5th retry still fails, no more retries will be made, and the Callback will be lost.
