Skip to main content

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)

 

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