Closed Dskpupper closed 2 years ago
2nd method worked,
Hi, I am in the same situation as you were and cannot pass the error page about reditect_uri. I cannot see what is the 2nd method you mentioned, would mind sharing it with me please, it would help a lot. Thank you
@ArnaudCampestre try using this code instead:
import onedrivesdk
from onedrivesdk.helpers import GetAuthCodeServer
redirect_uri = 'http://localhost:8080/'
client_secret = 'your_app_secret'
scopes=['wl.signin', 'wl.offline_access', 'onedrive.readwrite']
client = onedrivesdk.get_default_client(
client_id='your_client_id', scopes=scopes)
auth_url = client.auth_provider.get_auth_url(redirect_uri)
#this will block until we have the code
code = GetAuthCodeServer.get_auth_code(auth_url, redirect_uri)
client.auth_provider.authenticate(code, redirect_uri, client_secret)
@KTibow Thank you very much for your help, it worked brilliantly. Have a good one and thank you again
I mentioned my redirect uri while registering and created id and password, but when i click the link i get this error msg in the browser .
What should be redirect_uri? Im trying to connect my personal onedrive with this python code
This is the redirect uri im using redirect_uri = 'http://localhost:8080/'