Retrieves the conversation for a specified task.
The SID of the conversation task.
A promise that resolves to the conversation for the task.
FlexSdkError with the following error code(s):
import { createClient } from "@twilio/flex-sdk";import { GetConversationByTask } from "@twilio/flex-sdk/actions/Conversation";async function getConversationByTask() { const client = await createClient("SDK_TOKEN"); const getConversationByTask = new GetConversationByTask( "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ); const conversation = await client.execute(getConversationByTask); return conversation;} Copy
import { createClient } from "@twilio/flex-sdk";import { GetConversationByTask } from "@twilio/flex-sdk/actions/Conversation";async function getConversationByTask() { const client = await createClient("SDK_TOKEN"); const getConversationByTask = new GetConversationByTask( "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ); const conversation = await client.execute(getConversationByTask); return conversation;}
Retrieves the conversation for a specified task.
Param: taskSid
The SID of the conversation task.
Returns
A promise that resolves to the conversation for the task.
Throws
FlexSdkError with the following error code(s):
Example