Skip to main content

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

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)
        })

Reply