htabbach | 2016-06-16 19:03:12 UTC | #1
Hello,
I am trying to download a recording for a call using the ConversationId, I am using the method GetConversationIdRecordings, where I pass the ConversationId and the other parameters. However, when I get the response back I don't seem to be able to figure out where the downloaded Wav is, below is my code:
Dim result As List(Of Recording) = apiInstance.GetConversationIdRecordings(conversationId, maxWaitMs, formatId) For Each Rcrd As Recording In result (where do I go from here?) Next
Thank you
tim.smith | 2016-06-16 18:50:21 UTC | #2
The GetConversationIdRecordings(...) method returns a List<Recording> collection. Each Recording has a MediaUris property, which is of type Dictionary<string, MediaResult>. MediaResult has a property MediaUri that has a URI that can be used to retrieve the recording file.
Now, just use your preferred method to download the file. Here's one way: How to: Download a File in Visual Basic
htabbach | 2016-06-16 19:13:59 UTC | #3
Thank you for the response, I can see the MediaUris property and that is of type Dictionary but not sure how to access the MediaResult values, any ideas?
tim.smith | 2016-06-16 19:24:04 UTC | #4
Check out the docs for the construct: Dictionary<TKey, TValue> Class. If you want to look at each item, iterate over the Keys property and retrieve the value using the key. If you know the key of the item you want, you can retrieve the item directly via the key.
htabbach | 2016-06-29 00:14:10 UTC | #5
I am getting this error with handful of calls, not sure why it says not found
"Error calling GetConversationIdRecordings: {""status"":404,""code"":""not.found"",""message"":""The requested operation failed with status 404"",""contextId"":""6d424522-28c2-45d7-8de0-70900a1e8d41"",""details"":[],""errors"":[]}"
tim.smith | 2016-06-29 14:24:08 UTC | #6
That's most likely because there aren't any recordings for that conversation. You can verify by viewing the Interaction Detail page by going to Performance > Interactions and clicking on the interaction in question. You'll see this if there are no recordings:
<img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/1cf3ae98d3f09d96c8af8f941b89e246d1d83f06.png" width="690" height="212">
system | 2017-08-28 19:24:54 UTC | #7
This post was migrated from the old Developer Forum.
ref: 82