Skip to content
Start here

Kick all participants

client.RealtimeKit.ActiveSession.KickAllParticipants(ctx, appID, meetingID, body) (*ActiveSessionKickAllParticipantsResponse, error)
POST/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick-all

Kicks all participants from an active session for the given meeting 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
body ActiveSessionKickAllParticipantsParams
AccountID param.Field[string]

The account identifier tag.

maxLength32
ReturnsExpand Collapse
type ActiveSessionKickAllParticipantsResponse struct{…}
Data ActiveSessionKickAllParticipantsResponseDataoptional
Action stringoptional
KickedParticipantsCount float64optional
Success booloptional

Kick all participants

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/realtime_kit"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.RealtimeKit.ActiveSession.KickAllParticipants(
    context.TODO(),
    "app_id",
    "meeting_id",
    realtime_kit.ActiveSessionKickAllParticipantsParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Data)
}
{
  "data": {
    "action": "action",
    "kicked_participants_count": 0
  },
  "success": true
}
Returns Examples
{
  "data": {
    "action": "action",
    "kicked_participants_count": 0
  },
  "success": true
}