GuidesAPI Reference
Log In

You can kick certain users out of the room at runtime.


  • This feature is available in version 1.9.0 and above of ZEPETO World Package.

  • Please create the server code index.ts Sandbox.


## Function definition

Column Title
Column Title
kick(client: SandboxPlayer, reason?: string): Promise<void>;It is a function to kick out the SandboxPlayer after receiving the SandboxPlayer with SessionID. - If you are kicked out, a pop-up will appear informing you that you are kicked out, but the pop-up is the UI of the ZEPETO app and cannot be checked by the editor.

First, to get user information, define Schema Types and RoomState as follows:



## Example of use

  • Use the data in UserInfos to get the session ID of the user who will be kicked out of the userId.

  • After importing the sandbox player with the session ID, call the kick function.

  • I can tell you who was kicked out through broadcast.

By default, users who have been kicked out can enter the room again

  • To prevent this, use the DataStorage management function based on the UserId to store the room information that was kicked out by the user.

  • You can implement it by calling a kick when you try to enter the room.