Skip to main content
Question

call recording Api

  • April 5, 2019
  • 1 reply
  • 240 views

I have used cal recording content API for integration in js


This give me this type of response not a binary data

How to get binary data from API



It's very urgent please give me a fast replay

1 reply

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • April 5, 2019
Hi Ammar,

It will be very straightforward. E.g. using the Node JS SDK, you can call:

platform.get(contentUri)
        .then(function(res) {
          return res.response().buffer();
        })
        .then(function(buffer) {
          fs.writeFile("contentFile.mp3", buffer, function(){
               console.log("done")
          })
        })
        .catch(function(e){
           console.log(e)
        })