How can I get the worker queues for the logged in agent on Twilio Flex

62 views Asked by At

I need to get the Queues assigned to a logged in Agent on Twilio Flex within a Flex Plugin.

I want to add a select box to let the agent select the outbound queue used for calling users, but I'm not able to get the Agent queues, I'm able to get all Queues but I'm not able to get queues for a specific user.

1

There are 1 answers

0
csevero On

You can use the Task Queues API to get a list of all queues filtering by Worker SID.

Follow the reference: Task Queue Resource.

For example, using the Twilio CLI you can get all the queues that an agent is assigned using:

twilio api:taskrouter:v1:workspaces:task-queues:list --workspace-sid WSXXXX --worker-sid WKXXXX --no-limit

I hope that it can help you.