January Tidbits

SMS Questions Answered

You've got SMS questions; We've got Answers!

question

ammar15343 avatar image
ammar15343 asked Phong Vu answered

call recording Api

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
topic-default
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

·
Phong Vu avatar image
Phong Vu answered
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)
        })
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.