Example code calling REST API to retrieve Call Recording from Sandbox

  • 1
  • Question
  • Updated 5 months ago
  • (Edited)
My overall goal is to call someone in the sandbox, then record the call, and then retrieve the recording thru the REST API. 


I've been successful setting up the sandbox and generating the call recordings, and I can see them in the web account of USER1.  So far so good. 

I am using Ringcentral's Java API found here: https://github.com/ringcentral/ringcentral-java
and I am exploring the REST API here: http://ringcentral.github.io/api-explorer

I've been successful setting up OAuth and can get simple REST calls to work, for example: 

import com.ringcentral.RestClient;
import com.ringcentral.RestException;
import com.ringcentral.definitions.*;

public class Main {

    public static void main(String[] args) throws IOException, RestException {
        RestClient restClient = new RestClient("USER1clienttid", "USER1clientsecret", RestClient.SANDBOX_SERVER);
        restClient.authorize("+18001234567", "102", "USER1password");
       
        VersionInfo versionInfo = restClient.get("/restapi/v1.0", VersionInfo.class);
        System.out.println("RESULT: " + versionInfo.versionString);

        // WORKS GREAT!

        // TODO: example code to do call recording retrieval

      }
}

What is the sequence of REST calls do I need to learn to retrieve a Call Recording?  For example:
Is the RingCentral Java API mature enough to download Call Recordings?  I see other examples (e.g. SMS) in the Java API, but no Call Recording related ones.  How do I specify a certain Call Recording to download?  Probably a URI.  But do I need to get the Call Log to learn the Call Recording URI first? 

I have made USER1 Super Admin to avoid permission issues.

Thank you in advance,
Joe
Photo of Joe T

Joe T

  • 182 Points 100 badge 2x thumb
  • numerical

Posted 5 months ago

  • 1

Be the first to post a reply!