Using client credential OAuth to control converstation state such as answer or disconnect

Hi, I am getting "not authorized" when I try to answer a chat with client credential OAuth. After a bit of reading I see that it is not supported to use client credentials to control calls because there is no user context. However, what is the way then to monitor and control conversations in general with a non user application? I have a java application running which monitors ringing calls and I want to auto-answer specific calls in specific queues. Auto answer is not available for non voice interactions so there is a need for this functionality but we can't use Code Auth for this because the same Java application will control the call of several user.
Can this be achieved somehow? If not, are there any plans to introduce this feature (clients having access to all conversations to control state)? I expected that if I give admin permissions to a client credential OAuth then I will have access to conversations state control too.
thanks, Zsolt

You can monitor conversations using notifications or GET API endpoints using client credentials. You cannot control conversations with a non-user token, however. You can request new features and share your use case at https://genesyscloud.ideas.aha.io/.

The only workaround is to use a user-based token by implementing the implicit, code auth, or SAML2 Bearer grants, whichever is most appropriate for your architecture.

Hi Tim, correct me if I see it wrong but the implicit, code auth and SAML2 Bearers will only grant access to interactions of only a specific user who provides the authentication, not several other (or all) users. Or if I give conversation scope then will I be able to answer calls from other users as well?

Hello,

That's correct - most of the conversation control requests (like answer) will only be processed if requested by a specific user who is a participant of the conversation (and who provides the authorization token using implicit/authorization code/SAML2 Bearer grants).
A user cannot answer a call on behalf of another user.

There is a Genesys Cloud idea which had been created for auto-answer on digital channels.
Reading the comments, it is still in progress but was accepted at least.

Regards,

In order to achieve this (answer on behalf of a user), you could implement a server-side application/service that would rely on Authorization Code grant flow.
Your Contact Center agents would still have to log in your app (I mean to trigger an authorization code grant flow to your app/service).
Your app would retrieve the authorization code (related to a specific user) and could then request an authorization token out of it (and store it).
Your app will then be able to send Platform API requests on behalf of that user (ex: request to answer a chat which is sent to this specific user).

Regards,

Hi, thanks for the update, I came to the same conclusion. I have just tested Auth code and it nicely answers the chat for the agent who performed the authorization but I get "Access to Conversation {id} is forbidden." for another agent.
I have seen the IDEA request but that was raised 4 years ago and it is still not implemented, several of our customers want it. That is exactly why I tried to implement this at the server side but it would be hard to manage and ask all users to log in one by one (even with SSO) to allow the auto answer functionality. The way it should work is that you should have an special right to allow access to other conversations to answer/transfer and disconnect rather than using a very granular user by user approval.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.