Skip to main content
Question

Auth url is returning w

  • July 25, 2024
  • 1 reply
  • 10 views

Sorry I’m new here but I need assistance, this request to get a authorization url is coming back 200 response and it gives me a link, i click on the link and it goes to my companies actual page and then it says 404. I just added this to the developers → settings → oauth section for uri:‘https://mycompany.com/oauth/callback’ but shoudl this be different?

 

 

import requests


url = "https://platform.ringcentral.com/restapi/oauth/authorize"
params = {
    "client_id": client_id,
    
    "redirect_uri": ‘https://mycompany.com/oauth/callback,
    "response_type": "code"
}

print(client_id)

# Make the POST request
response = requests.post(url, data=params)
print(response)
# Print the response
print(response.status_code)
print(response.text)

 

1 reply

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2343 replies
  • July 25, 2024

I don’t understand your code and I don’t think that you even got the auth code.

The fundamental is that you call the oauth/authorize endpoint to get the auth code, then you use the auth code to get the token by calling the oauth/token endpoint.

Why don’t you use the RingCentral Python SDK and follow the sample code in this dev guide to login and call APIs.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings