I am using the JavaScript SDK (platform client) and calling apiInstance.getWebmessagingMessages
but I get a 403 forbidden, even though my agent has the conversation / web messaging / view
permission. The Documentation states that no permissions are required to get the messages.
Hi Michael,
This API end point is built to get the history for custom Messenger (client facing) . It's relied on token used at webmessaging session management time.
On agent side you should rely on conversation / messaging API
regards
Frederic Thomas
The messagingAPI (platformClient.messagingAPI) has methods only for supported content profiles.
The conversationsAPI (platformClient.conversationAPI) does not have any methods to get web-messaging chat messages.
The method getConversationsChatMessages
returns 404 (I guess it retrieves web-chat messages) and the getConversationsMessage
gets the conversation details without the messages. only the participants.
Which is the correct method in platformClient to get the web-messaging chat messages?
I am not an expert of these APIs for what I know for live, on live interaction, you should retrieve the conversation details and loops on each messageId
regards
Hello,
On Agent side, the messages of a web messaging conversation are retrieved using POST /api/v2/conversations/messages/{conversationId}/messages/bulk.
The body contains an array of the messageIds to retrieve.
You can get these messageIds from GET /api/v2/conversations/{conversationId} (messageIds of messages sessions for the different participants).
This blueprint contains a javascript example. Check the showChatTranscript function in https://github.com/GenesysCloudBlueprints/digital-messaging-translator-blueprint/blob/main/docs/scripts/main.js
Regards,
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.