CloseRoom
https://rtc-api.zego.im/
This API removes all users from the Room and closes the Room.
If the developer has configured Logged Out Callback and Stream Destroyed Callback according to Callback Configuration Guide, when the server calls this API:
- The server will receive Logged Out Callback notifications, allowing the developer to track user logout events from the Room.
- The status of Streams in the original Room will be closed, and the server will receive Stream Destroyed Callback, allowing the developer to be informed about Stream closure in the Room.
After the Room is closed, client users will be kicked out of the Room and will receive ZEGOCLOUD SDK callback interfaces:
| ZegoExpress SDK | LiveRoom SDK | |
|---|---|---|
| iOS/macOS | onRoomStateChanged | onKickout |
| Android | onRoomStateChanged | onKickout |
| Windows | onRoomStateChanged | OnKickOut |
| Web | roomStateChanged | onKickout |
Request
Query Parameters
Possible values: [CloseRoom]
API Prototype Parameter
https://rtc-api.zego.im?Action=CloseRoom
💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.
💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.
💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.
💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.
Possible values: [2.0]
Default value: 2.0
💡Public parameter. Signature version number.
Room ID.
Reason for closing, with a maximum length of 256 bytes. When using, URL encoding (UrlEncode) must be performed on its content.
Whether to generate Room Close Callback. Since this is usually an active closure initiated by the developer, no separate Room Close Callback notification will be sent to the developer. If you need to use Room Close Callback for unified logic processing, you can change it to true.
📌 Note
This parameter only affects whether Room Close Callback is generated. Callback notifications for Room closure due to other reasons (such as Logged Out Callback) are not affected.
Responses
- 200
- application/json
