logo
Voice Call
Server API
Stream Mixing and Transcoding APIs
On this page

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。
Note

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 parametersTypeDescription
eventStringCallback event, this callback returns room_create.
appidUInt32Unique identifier of the APP.
timestampInt64Server current time, Unix timestamp, unit: seconds.
nonceStringRandom number.
signatureStringVerification string, for details see Verification instructions.
Business parametersTypeDescription
room_idStringRoom ID.
room_session_idUInt64

Unique identifier of the Room lifecycle, remains unchanged during the entire lifecycle of the Room.
After the Room is created, a unique room_session_id will be generated; if the Room is destroyed and then a new Room is created with the same room_id, a new unique room_session_id will be generated.

This parameter is consistent with the parameter room_seq in the User Logged in callback and User Logged out callback.

room_create_timeStringRoom creation time, server current time, Unix timestamp, unit: milliseconds.
id_nameStringUser ID of the Room creator.
Note

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.

Previous

Callback Configuration Description

Next

Room destroyed Callback

On this page

Back to top