Question

API call data download using SSO and Python

  • 11 November 2020
  • 5 replies
  • 1533 views

I am trying to reproduce this but it is empty in Sandbox: https://community.ringcentral.com/questions/8457/pull-call-data-python-api.html

What is my password in prod if I am using SSO? I only see a password for Sandbox.

Or, alternatively, how do i generate my own "authorization: Bearer" token? because I can do the "TRY IT NOW" stuff as seen here: https://developers.ringcentral.com/api-reference/Call-Log/readUserCallLog

Please and thank you.

PS: is there a way to download a pre-made report that is currently being emailed?


5 replies

Userlevel 1

Please check out this Quick Start code to implement 3-Legged authentication in Python. It also shows a few APIs call demo and one of that is to read the user call log.

@Phong Vu here is what I get when I try to run that "getting started" code:

{
  "error" : "invalid_client",
  "errors" : [ {
    "errorCode" : "OAU-113",
    "message" : "No redirect uri is registered for the client"
  } ],
  "error_description" : "No redirect uri is registered for the client"
}

I even made a new app that has "Available Auth Flows: Auth Code" but I get the same error.

Google isn't helping. Please and thank you!

PS: Is making a Flask app really necessary if all I want to do is download reports? Shouldn't this all be possible with simple GET/POST requests?

Userlevel 1

Check your app to see if you have added this to the redirect url. Change the port 5000 accordingly if you use other port number than 5000

http://localhost:5000/oauth2callback.

Thanks for the response. I had that before; same problem: https://gist.github.com/willr-medly/94cea96081a6fb15e434966d39b0d6cd

Userlevel 1

What you meant before? So you are not running on a local machine? The error message "No redirect uri is registered for the client" is clearly saying that there is no redirect uri for this app. Check the app or let me know your app client id.

Reply