Skip to content
Start here

Kick participants from an active session

client.realtimeKit.activeSession.kickParticipants(stringappId, stringmeetingId, ActiveSessionKickParticipantsParams { account_id, custom_participant_ids, participant_ids } params, RequestOptionsoptions?): ActiveSessionKickParticipantsResponse { data, success }
POST/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick

Kicks one or more participants from an active session using user ID or custom participant ID.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Realtime AdminRealtime
ParametersExpand Collapse
appId: string

The app identifier tag.

maxLength32
meetingId: string
params: ActiveSessionKickParticipantsParams { account_id, custom_participant_ids, participant_ids }
account_id: string

Path param: The account identifier tag.

maxLength32
custom_participant_ids: Array<string>

Body param

participant_ids: Array<string>

Body param

ReturnsExpand Collapse
ActiveSessionKickParticipantsResponse { data, success }
data?: Data { action, participants }
action?: string
participants?: Array<Participant>
id: string

ID of the session participant

created_at: string
updated_at: string
email?: string

Email of the session participant.

name?: string

Name of the session participant.

picture?: string

A URL pointing to a picture of the participant.

success?: boolean

Kick participants from an active session

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const response = await client.realtimeKit.activeSession.kickParticipants('app_id', 'meeting_id', {
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
  custom_participant_ids: ['string'],
  participant_ids: ['string'],
});

console.log(response.data);
{
  "data": {
    "action": "action",
    "participants": [
      {
        "id": "id",
        "created_at": "created_at",
        "updated_at": "updated_at",
        "email": "email",
        "name": "name",
        "picture": "picture"
      }
    ]
  },
  "success": true
}
{
  "error": {
    "code": 404,
    "message": "No user found with id 813432c7-3c5a-45e2-9acf-eef7061c7584"
  },
  "success": false
}
Returns Examples
{
  "data": {
    "action": "action",
    "participants": [
      {
        "id": "id",
        "created_at": "created_at",
        "updated_at": "updated_at",
        "email": "email",
        "name": "name",
        "picture": "picture"
      }
    ]
  },
  "success": true
}
{
  "error": {
    "code": 404,
    "message": "No user found with id 813432c7-3c5a-45e2-9acf-eef7061c7584"
  },
  "success": false
}