Kicks a participant from a task.
The unique identifier (SID) of the participant to be kicked, can be either worker SID or participant SID.
The unique identifier (SID) of the task to kick the participant from.
A promise that resolves when the participant is successfully kicked.
FlexSdkError with the following error code(s):
import { createClient } from "@twilio/flex-sdk";import { KickVoiceParticipant } from "@twilio/flex-sdk/actions/Voice";async function kickVoiceParticipant() { const client = await createClient("SDK_TOKEN"); const kickVoiceParticipant = new KickVoiceParticipant("UTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); await client.execute(kickVoiceParticipant);} Copy
import { createClient } from "@twilio/flex-sdk";import { KickVoiceParticipant } from "@twilio/flex-sdk/actions/Voice";async function kickVoiceParticipant() { const client = await createClient("SDK_TOKEN"); const kickVoiceParticipant = new KickVoiceParticipant("UTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); await client.execute(kickVoiceParticipant);}
Kicks a participant from a task.
Param: targetParticipantSid
The unique identifier (SID) of the participant to be kicked, can be either worker SID or participant SID.
Param: taskSid
The unique identifier (SID) of the task to kick the participant from.
Returns
A promise that resolves when the participant is successfully kicked.
Throws
FlexSdkError with the following error code(s):
Example