Mute participants of an active session
client.RealtimeKit.ActiveSession.MuteParticipants(ctx, appID, meetingID, params) (*ActiveSessionMuteParticipantsResponse, error)
POST/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/mute
Mutes 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:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Mute participants of an active session
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.MuteParticipants(
context.TODO(),
"14a396e7-ca44-4937-bf1f-050a69118543",
"meeting_id",
realtime_kit.ActiveSessionMuteParticipantsParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
{
"data": {
"action": "action",
"participants": [
{
"id": "id",
"created_at": "created_at",
"updated_at": "updated_at",
"email": "email",
"name": "name",
"picture": "picture"
}
]
},
"success": true
}Returns Examples
{
"data": {
"action": "action",
"participants": [
{
"id": "id",
"created_at": "created_at",
"updated_at": "updated_at",
"email": "email",
"name": "name",
"picture": "picture"
}
]
},
"success": true
}