getConversationRecordings returning null

I am running into the same scenario that is referenced in this thread under the .NET SDK: https://developer.mypurecloud.com/forum/t/getting-null-when-calling-getconversationrecordings/1930/2

I am receiving a null response, which means that the recording is still loading. @tim.smith made the suggestion to "Use the WithHttpInfo variety of the method and access the headers from the response object.".

Is it possible to do something similar with the JavaScript SDK? If so how would that work?

Here is my current request:

var apiInstance = new platformClient.RecordingApi();
var opts = {
'maxWaitMs': 60000, // Number | The maximum number of milliseconds to wait for the recording to be ready. Must be a positive value.
'formatId': "WEBM" // String | The desired media format. Possible values: NONE, MP3, WAV, or WEBM
};

    apiInstance.getConversationRecordings(conversationId, opts)
      .then(function(data) {
        console.log(`getConversationRecordings success! data: ${JSON.stringify(data, null, 2)}`);
        res.setHeader('Content-Type', 'application/json');
        res.send(JSON.stringify(data, null, 2));
      })
      .catch(function(err) {
      	console.log('There was a failure calling getConversationRecordings');
        console.error(err);
        res.status(500).send('Something broke!');
      });

Thanks,
--Lehel

See the section Extended Responses in the JavaScript SDK Documentation.

Thanks, that worked.

--Lehel

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