logo
In-app Chat
On this page

Destroy a room


Description

By this API, you can destroy a room.

The client will receive the notification through the following callbacks when the room is destroyed.

PlatformCallback
iOS/macOSzim:roomStateChanged:event:extendedData:
AndroidonRoomStateChanged
WindowsonRoomStateChanged
WebroomStateChanged

Request method and endpoint

  • Request method: GET
  • Request URL: https://zim-api.zego.im/?Action=DestroyRoom
  • Transmission protocol: HTTPS
  • QPS limit: 20 requests/second

Request parameters

Listed below are the parameters specific to this request and part of the common request parameters. For the complete list of common request parameters, see Accessing Server APIs - Common parameters.

ParameterTypeRequiredDescription
RoomIdStringYesRoom ID.
Note

The RoomId can only contain numbers, letters, and the following special characters: !#$%&()+-:;<=.>?@[]^_{}|~.

Sample request

Untitled
https://zim-api.zego.im/?Action=DestroyRoom
&RoomId=123
&<Common parameters>
1
Copied!

Response parameters

ParameterTypeDescription
CodeNumberReturn code.
MessageStringDescription of the request execution result.
RequestIdStringRequest ID.

Sample response

Untitled
{
    "Code":0,
    "Message":"success",
    "RequestId":"343649807833778782"
}
1
Copied!

Return codes

Listed below are the return codes related to this API. For the complete list of return codes, see Return codes.

return codeDescription
660300001The room does not exist.

Previous

Delete all friends

Next

Obtain information about users in a room