question

Will Rudebusch avatar image
Will Rudebusch asked Ahmed Fahmy commented

API call data download using SSO and Python

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?

authentication
1 |1500 characters needed characters left characters exceeded

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

Phong Vu avatar image
Phong Vu answered

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.

1 |1500 characters needed characters left characters exceeded

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

Will Rudebusch avatar image
Will Rudebusch answered Phong Vu commented

@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?

1 comment
1 |1500 characters needed characters left characters exceeded

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

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.

0 Likes 0 ·
Will Rudebusch avatar image
Will Rudebusch answered Ahmed Fahmy commented

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

15 comments
1 |1500 characters needed characters left characters exceeded

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

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.

0 Likes 0 ·

RINGCENTRAL_CLIENT_ID= 'v0t3d4BOTiqaSJ-E-SVCKA'

0 Likes 0 ·

As I suspected and the error message said, your app does not have the redirect uri at all

screen-shot-2020-11-12-at-83839-am.png


Login to your RingCentral Developer portal, select the app and open the app settings to provide the redirect uri accordingly.

0 Likes 0 ·
Show more comments

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys