Accepts a task and reserves it for the current worker.
Remarks
For voice tasks, you must register a VoiceClientEvent listener with AddVoiceEventListener before running this action.
If this is not done, accepting the task may fail.
Param: taskSid
The unique identifier (SID) of the task to be accepted.
Param: options
Optional configuration parameters for customizing the task acceptance process.
Returns
A promise that resolves to a Reservation and a Task object representing the accepted task.
Accepts a task and reserves it for the current worker.
Remarks
For voice tasks, you must register a
VoiceClientEventlistener withAddVoiceEventListenerbefore running this action. If this is not done, accepting the task may fail.Param: taskSid
The unique identifier (SID) of the task to be accepted.
Param: options
Optional configuration parameters for customizing the task acceptance process.
Returns
A promise that resolves to a
Reservationand aTaskobject representing the accepted task.Throws
FlexSdkError with the following error code(s):
Example