This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 189
Invalid_grant when using onedrive python sdk code flow oathuv2 #97
Comments
I have the same issue. |
I also have the same issue. |
Try specifying the same redirect_uri in the app registration as in the code. In my case, I used http://localhost:8080/ |
Thanks. I found a typo, after that it was fixed.
On Saturday, February 24, 2018, 4:33:27 PM EST, Ivette Castro <[email protected]> wrote:
Try specifying the same redirect_uri in the app registration as in the code. In my case, I used http://localhost:8080/
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I have this error since I call authenticate twice, and the code is only valid for once. |
Hi, If I remember correctly, I had a wrong reference somewhere from making a lot of changes. It is fixed now. Thanks for sharing.
On Thursday, July 12, 2018 05:09:07 AM, Liu, An-Chi <[email protected]> wrote:
I have this error since I call authenticate twice, and the code is only valid for once.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #209 for more information |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am using the following code to get an access_token:
But I keep getting invalid_grant error on line: access_token=client.auth_provider.authenticate(code, redirect_uri, client_secret)
I don't know what is going on in the background and thus can not debug it. Can anyone help? Thanks.
Here is the error msg:
ERROR in app: Exception on /onedriveauth/ [POST]
Traceback (most recent call last):
File "/Users/Applications/User/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "/Users/Applications/User/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/Applications/User/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/Applications/User/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/Applications/User/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File "/Users/Documents/flaskr/myapplication.py", line 69, in decorated_function
return f(*args, **kwargs)
File "/Users/Documents/flaskr/myapplication.py", line 3791, in onedriveauth
access_token=client.auth_provider.authenticate(code, redirect_uri, client_secret)#added grant_type='authorization_code'
File "/Users/Applications/User/lib/python2.7/site-packages/onedrivesdk/auth_provider.py", line 203, in authenticate
data=params)
File "/Users/Applications/User/lib/python2.7/site-packages/onedrivesdk/http_provider.py", line 71, in send
custom_response = HttpResponse(response.status_code, response.headers, response.text)
File "/Users/Applications/User/lib/python2.7/site-packages/onedrivesdk/http_response.py", line 61, in init
raise Exception(str(message["error"]))
Exception: invalid_grant
The text was updated successfully, but these errors were encountered: