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
API call data download using SSO and Python
Tags: authentication
Nov 11, 2020 at 8:17am   •   3 replies  •  0 likes
Will Rudebusch

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?

3 Answers
answered on Nov 12, 2020 at 6:48am  

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


 0
on Nov 12, 2020 at 7:13am   •  0 likes

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.

answered on Nov 12, 2020 at 7:37am  

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


 0
on Nov 12, 2020 at 7:49am   •  0 likes

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.

on Nov 12, 2020 at 8:08am   •  0 likes

RINGCENTRAL_CLIENT_ID= 'v0t3d4BOTiqaSJ-E-SVCKA'

on Nov 12, 2020 at 8:41am   •  0 likes

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.

on Nov 12, 2020 at 8:55am   •  0 likes

I added

http://localhost:5000/oauth2callback

to the settings panel but I am still getting the same error:

{
  "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"
}
on Nov 12, 2020 at 8:58am   •  0 likes

Give the system some times to populate the change. And this time you are running locally?

on Nov 12, 2020 at 9:23am   •  0 likes

seems to have updated the URI, now i get this:
screen-shot-2020-11-12-at-122101-pm.pngI get a "Sorry, we don't recognize your email address." error if i just try to use email. Thanks for helping.

on Nov 12, 2020 at 9:24am   •  0 likes

Again, you have not enabled SSO for your sandbox account. Use the phone number instead.

on Nov 12, 2020 at 9:37am   •  0 likes

I need production data. Please help.

on Nov 12, 2020 at 9:40am   •  0 likes

I am lost. I see you are running from 1 problem to another and now you said you need production data. What is that?

on Nov 12, 2020 at 9:42am   •  0 likes

Why is sandbox a different setup than prod? Different client_id makes sense but how am I going to use SSO in prod if I can't use it in Sandbox?

on Nov 12, 2020 at 9:47am   •  0 likes

Sandbox and production are different environments. You cannot mix them just because of the main purpose of the sandbox is for you to test your app w/o messing up your production account settings/configuration. You cannot login your sandbox with your production credentials and vise versa.

on Nov 12, 2020 at 9:55am   •  0 likes

I need SSO so I can test my app in sandbox. I need to test it to "graduate" to prod. I am blocked.

on Jan 5, 2021 at 4:31pm   •  0 likes

I see that you are just mixing between the two environments, so first upgrade your sandbox app to production (you will find on your sandbox console page instructions to do that). then when you see that your app is approved to be graduated to production you will have your new client ID and client secret which you can use for authentication, here and at this stage, you can use your prod SSO login and you will get the pop-up msg to authorize your login which will then generate the access token required to make the API calls using a python script or simply by using Postman.

on Nov 12, 2020 at 10:28am   •  0 likes

If you need SSO for your sandbox account then set it up. I just don't know why you insist using SSO to login when you don't have SSO enabled for your sandbox. Why don't you just simply use the user phone number and password set for your user in sandbox.

on Nov 12, 2020 at 9:16am   •  0 likes

yes

answered on Nov 11, 2020 at 12:41pm  

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.


 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