Teja | 2022-08-23 17:56:01 UTC | #1
Hello, I am using the Guest API for Web Messaging, and I have a few use-cases to send the agent name and disconnect trigger to front end, and send a url to the user. I was going to use the /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages API from script to trigger the API call automatically I found that this API cannot be called with client credentials. Is there any workaround to send messages using a different API or still send the messages with another grant type from a data action in script.
Mourya
Angelo_Cicchitto | 2022-08-24 08:53:19 UTC | #2
Hi Mourya,
The issue with API seems strange: can you double check that your client credentials are associated with a Role that has proper permissions to use those APIs? On a side note, we are now working on new Web Messaging features so that Guest Session and Messenger can receive:
Teja | 2022-08-24 15:03:12 UTC | #3
Hi Angelo, Thanks for the info on the two upcoming features. I've checked the permissions and as per API documentation it needs conversation:create and webmessaging:create permissions and these are assigned to the OAuth.
Below is the error I see: "message": "This request requires a user context. Client credentials cannot be used for requests to this resource.", "code": "bad.request", "status": 400,
Angelo_Cicchitto | 2022-08-25 09:25:38 UTC | #4
Mourya, would it be sufficient here to use the native Architect Flow actions to send the response? either Send Response action or a Bot. You are right, that API does require user-context: for Web Messaging, it's not possible to send a message directly from a script today.
Teja | 2022-08-25 14:35:46 UTC | #5
We could use Architect to send the message for one of our usecase where we send a uri to the frontend though its not ideal as it can't run asynchronously. Do you happen to know what is the target release date for the above ideas this would help dictate our golive dates.
Angelo_Cicchitto | 2022-08-25 14:59:52 UTC | #6
The work is in progress, you can track updates to tentative release plan directly from Ideas portal, and click on the GENESYS CLOUD ROADMAP tab. As we advance with development, those dates will adjust accordingly.
system | 2022-09-24 15:00:43 UTC | #7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 16001