beliczazsolt | 2022-05-05 12:52:34 UTC | #1
Hi there, I would like to fetch the transcript of the web messaging communication so we can send it out in an email to the customer. However, it couldn't find an easy and effective way to do that.
- I can fetch the message IDs of the conversation:
/api/v2/conversations/messages/{conversationId}
- the above response will contain all the message ids, time, direction but not the actual message sent by the customr or the agent. As such I need to run another API call for reach message to get the actual text
/api/v2/conversations/messages/{conversationId}/messages/{messageId}
This method works but it appears to be very ineffective, I will need to send a LOT of API calls to fetch all the messages. I wonder if there is a better way to solve this with only a single API call like we can do this with the old web messages? I dont want to make dozens of API calls just to get the messages of a single conversation if possible.
Thanks, Zsolt
tim.smith | 2022-05-05 12:54:44 UTC | #2
The API endpoint you referenced is for active use during a conversation and is not an effective way to get a conversations full chat history, as you've found. What you're looking for is Recordings. There are a few different ways to get them depending on your use case.
beliczazsolt | 2022-05-05 13:07:06 UTC | #3
Thanks Tim, the recordings API indeed does the job.
/api/v2/conversations/{conversationId}/recordings
Zsolt
system | 2022-06-04 13:07:57 UTC | #4
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: 14603