Room Created Callback
Description
When developers need to know information about the creation of a Room, they can obtain it through this callback.
Callback instructions
- Request method: POST。
The callback data format is JSON, you need to decode it with UrlDecode.
- Request URL: Please configure the callback URL in the ZEGOCLOUD console.
- Transfer protocol: HTTPS/HTTP, HTTPS is recommended.
Callback parameters
| Common parameters | Type | Description |
|---|---|---|
| event | String | Callback event, this callback returns room_create. |
| 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 instructions. |
| Business parameters | Type | Description |
| room_id | String | Room ID. |
| room_session_id | UInt64 | Unique identifier of the Room lifecycle, remains unchanged during the entire lifecycle of the Room. This parameter is consistent with the parameter room_seq in the User Logged in callback and User Logged out callback. |
| room_create_time | String | Room creation time, server current time, Unix timestamp, unit: milliseconds. |
| id_name | String | User ID of the Room creator. |
It is recommended to convert some parameters to Int for logical processing. Related fields include room_create_time.
Data example
{
"event": "room_create",
"appid": 1,
"timestamp": 1499676978,
"nonce": "350176",
"signature": "signature",
"room_id": "rid_1242649",
"room_session_id": 858012925204410400,
"room_create_time": "1499676978027",
"id_name": "id123"
}Return response
Returning HTTP status code 2XX (e.g. 200) indicates success, other responses indicate failure.
Callback retry strategy
If ZEGOCLOUD server does not receive a response, or the received HTTP status code is not 2XX (e.g. 200), it will try to retry, up to 5 retries. The interval between each retry request and the previous request is 2s, 4s, 8s, 16s, 32s respectively. If the 5th retry still fails, no more retries will be made and the callback will be lost.
