python-o365 icon indicating copy to clipboard operation
python-o365 copied to clipboard

Authorization from web

Open SalmanAhmadBajwa opened this issue 2 years ago • 1 comments

I am using the library to fetch some attachments from the mail , I wanted my user to only provide the client_id and client_secretKey on the UI and redirect him/her to the authorization link but the callback in the get_authorization_url I am giving the localhost url, will it work on the localHost url as I am currently on development phase of my application.

auth_url ,state= connection.get_authorization_url(requested_scopes=scopes,redirect_uri='https://127.0.0.1:8000/billing.html')

This is the error i get when I redirect to the auth_url : We're unable to complete your request invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application.

SalmanAhmadBajwa avatar Dec 11 '22 21:12 SalmanAhmadBajwa

The expected value is a URI which matches a redirect URI registered for this client application.

Register the uri

alejcas avatar Dec 12 '22 14:12 alejcas