Leaves a conversation.
The SID of the task the conversation is linked to.
A promise that resolves when the conversation is successfully left.
FlexSdkError with the following error code(s):
import { createClient } from "@twilio/flex-sdk";import { LeaveConversation } from "@twilio/flex-sdk/actions/Conversation";async function leaveConversation() { const client = await createClient("SDK_TOKEN"); const leaveConversationAction = new LeaveConversation("WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); await client.execute(leaveConversationAction);} Copy
import { createClient } from "@twilio/flex-sdk";import { LeaveConversation } from "@twilio/flex-sdk/actions/Conversation";async function leaveConversation() { const client = await createClient("SDK_TOKEN"); const leaveConversationAction = new LeaveConversation("WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); await client.execute(leaveConversationAction);}
Leaves a conversation.
Param: taskSid
The SID of the task the conversation is linked to.
Returns
A promise that resolves when the conversation is successfully left.
Throws
FlexSdkError with the following error code(s):
Example