1
votes

All,

I am trying to build a library for onedrive.

Not to give too much detail but I have constructed the request and if I call this from a browser everything works fine, and i eventually get a json response.

https://login.live.com/oauth20_authorize.srf?client_id=CLIENT_ID&scope=wl.signin%20wl.basic&response_type=code&redirect_uri=http://someaddress.com/redirect.html

My problem is that I cannot get the authorization code in python using urllib2 and geturl() method as the redirect that yields the code is not seen by urllib2.

When I call the geturl() method I get the original url, not the redirect url containing the code.

Regards, Frage

1
did you get it working? I found a github python library, github.com/mk-fg/python-onedriveAnneTheAgile
Hey, thanks for this. I will have a look.frage

1 Answers

0
votes

With the release of the OneDrive API there is pretty solid documentation on how to implement the OAuth 2.0 standard from scratch. Following what that doc lays out should make the authentication flow in your application pretty straight-forward.