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

KickoutUser

GET

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

Use this interface to kick out a specified User from the Room. All the User's current publishing and playing Streams will be stopped. This is commonly used in content moderation scenarios where the developer's backend detects that a User's live streaming content violates the rules, and the User needs to be kicked out from the Room through this interface.

The kicked User on the client will receive the ZEGOCLOUD SDK callback interface:

ZegoExpress SDKLiveRoom SDK
iOS/macOSonRoomStateChangedonKickOut
AndroidonRoomStateChangedonKickOut
WindowsonRoomStateChangedOnKickOut
Web/小程序roomStateChangedonKickOut

The client receives notifications of User changes in the Room using the ZEGO Express SDK callback interface:

ZegoExpress SDKLiveRoom SDK
iOS/macOSonRoomUserUpdateonUserUpdate
AndroidonRoomUserUpdateonUserUpdate
WindowsonRoomUserUpdateOnUserUpdate
Web/小程序roomUserUpdateonUserStateUpdate
Rate Limit
All Rooms under the same AppID: 50 requests/second

Request

Query Parameters

    Action stringrequired

    Possible values: [KickoutUser]

    API prototype parameters

    https://rtc-api.zego.im?Action=KickoutUser

    AppId uint32required

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

    SignatureNonce stringrequired

    💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.

    Timestamp int64required

    💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.

    Signature stringrequired

    💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    RoomId stringrequired

    Room ID.

    UserId string[]required

    Possible values: >= 1, <= 5

    List of User IDs to kick out from the Room. Maximum of 5 User IDs supported.

    CustomReason string

    Possible values: <= 256 characters

    Reason for kicking out. Maximum length is 256 bytes. When used, URL encoding (UrlEncode) must be performed on the content.

Responses

Operation successful
Schema
    Code int32

    The following only lists some return codes related to the interface business logic. For complete return codes, please refer to Global Return Codes.

    Return CodeDescriptionSuggested Action
    50011The User list length is too long.Please check if the number of Users in the request packet exceeds the limit.
    Message string

    Description of the operation result.

    RequestId string

    Request ID.

Previous

CloseRoom

Next

Overview

On this page

Back to top