How do I answer a Chat call via API?

Good Morning.

I'm using the following API to answer a chat:
PATCH /api/v2/conversations/chats/{conversationId}/participants/{participantId}

However, when passing (mediaParticipantRequest.State = MediaParticipantRequest.StateEnum.Connected) as a parameter, the following error occurs:
"conversation.participant.update.invalid"
"message":"Access to Conversation {id} is forbidden.","code":"not.authorized","status":403,"details":[{"fieldName":"state"}

Detail:
When I use (mediaParticipantRequest.State = MediaParticipantRequest.StateEnum.Disconnected) to disconnect Participant, it works correctly.

How do I answer a Chat call via API?

1 Like

Hello,

It is not possible to answer a chant on behalf of someone else - as I assume that's what you are trying to do.

I mean that if you are using an access token obtained from an OAuth Client Credentials Grant client, and trying to answer a chat which is alerting a user/agent, it is not supported.
Only the user who has the chat in alerting can answer it (i.e. an access token related to the user who has the alerting chat - like Implicit Grant, Authorization Code Grant, SAML2 Bearer Grant).

Regards,

Thanks for the answer.
I'm not wanting to answer on behalf of the Agent, no.
I need to place an Api call in the Script, so that when a Chat arrives at the Agent, it automatically answers this Chat. Like an Auto Answer.

If you are executing a Genesys Cloud Data Action in your Script, the Data Action is using a Client Credentials grant (OAuth Client with Client Credentials Grant used by the Genesys Cloud Data Action integration).
So it is not possible to answer the chat invoking this Genesys Cloud Data Action as I explained above.

Regards,

Right.
Are there any other ways to Auto Answer a Chat?

without being via api?

Without leveraging the Platform API and a custom client application integration, it is not possible at this stage.

There is a Genesys Cloud idea on Auto-answer for digital channels. It has been accepted - but in the comments (september 21st 2021): "We do expect to begin work on this feature in 2022, but it's still TBD for a targeted date/quarter."

Regards,

OK thank you.
Regards.

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