logo
In-app Chat
ZIMAudio
On this page

KickoutRoomUser

GET

https://zim-api.zego.im/

Remove specified users from the room. This is often used in content moderation scenarios. When the developer's backend detects that a user has violated the rules, this API can be used to remove the user from the room.

The client will receive notifications such as user removal and changes to users in the room through the following ZIM SDK callbacks:

iOSAndroidmacOSWindows
roomStateChangedonRoomStateChangedroomStateChangedonRoomStateChanged
WebMini ProgramFlutterReact Native
roomStateChangedroomStateChangedonRoomStateChangedgroupMemberStateChanged
Unity3Duni-app | uni-app xHarmonyOS
OnRoomStateChangedgroupMemberStateChangedroomStateChanged
Note
The parameters RoomId and UserId[] only support numbers, English characters, and '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', ' ', ',', '{', '}'.
QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [KickoutRoomUser]

    API prototype parameter

    https://zim-api.zego.im/?Action=KickoutRoomUser

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Public parameter. A 16-character hexadecimal random string (hex encoding of 8-byte random number). Refer to Signature example for how to generate.

    Timestamp int64required

    💡Public parameter. Current Unix timestamp, in seconds. Refer to Signature example for how to generate, with a maximum error of 10 minutes.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    Signature stringrequired

    💡Public parameter. Signature, used to verify the legitimacy of the request. Refer to Signing the requests for how to generate an API request signature.

    RoomId stringrequired

    Possible values: <= 32 characters

    Room ID.

    UserId string[]required

    Possible values: <= 50

    List of user IDs to be removed (users who have logged in to the ZIM service by calling the login method on the client, or have completed registration by calling the server-side API). A maximum of 50 user IDs are supported.

    Example: UserId[]=a&UserId[]=b

    CustomReason string

    Possible values: <= 32 characters

    Reason for removing the user. It is recommended not to exceed 32 bytes.

Responses

OK
Schema
    Code integer

    Return code.

    The following only lists the return codes related to the API business logic. For the complete return codes, please refer to Return codes.

    Return codeDescription
    660000011Number of users exceeds the limit.
    660300001Room does not exist.
    660300002User is not in this room.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

Previous

Obtain information about users in a room

Next

Query whether a user is in a room

On this page

Back to top