News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Call recordings to Onedrive (Via Make.com/Zapier/Tray.io, etc)
Tags: rest api, zapier
Dec 20, 2022 at 10:30pm   •   1 replies  •  0 likes
Jefferey Lockyer

I'm looking to use a PnP API connection tool such as Make/Zapier, etc to try and automate a daily call recording file transfer from our call logs, to a Sharepoint/Onedrive location in our O365 cloud.

I can connect to my account, retrieve the call logs, but it seems there is a missing connector to "store" the file, as the token doesn't get shared from RingCentral, and I basically end up with a text file which contains:

"errorCode" : "AGW-401", "message" : "Authorization header is not specified"

Has anyone successfully created a process using a tool such as this, which would allow a scheduled dump of calls (based on the call log for the previous day - this part has been tested)

I am using a re-branded version of RingCentral through Telus Business Connect and so far, the API calls don't seem to be any different, so I don't think that will have any effect on what I am trying to accomplish. TIA, much appreciate for any direction.

1 Answer
answered on Dec 21, 2022 at 8:09am  

I am not familiar with the tool you are using. But you need to set a valid access token (the token you use to read the same call log record that gives you the call recording contentUri) to the HTTP Authorization header. Here is an example how I set it in Node JS.

const download_new = function(domain, path, accessToken, dest, cb) {
    var file = fs.createWriteStream(dest);
    var options = {
          host: domain,
          path: path,
          method: "GET",
          headers: {
            Authorization: `Bearer ${accessToken}`
          }
      }
    const req = https.request(options, res => {
    console.log(`statusCode: ${res.statusCode}`)
    res.pipe(file);
    file.on('finish', function() {
        file.close(cb);
    });
  })
  req.on('error', error => {
    console.error(error)
  })
  req.end()
}

Where the domain and path is taken from the contentUri

domain: media.ringcentral.com

path: /restapi/v1.0/account/xxxx/recording/xxxxxxxx/content


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us