We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Mobistudios A.
11 years agoNew member | Level 1
Python error when setting up access for my App to Dropbox account
Hi,
I'm new to this and need some help with setting up access with my Dropbox app to a Dropbox account using Python. When running the code I get the error shown below. I have inserted the app and ...
Mobistudios A.
11 years agoNew member | Level 1
"Are you sure you're entering the access code from dropbox.com properly"
Yes, I'm using a new access token.
1.
I go to my App console on Dropbox Developers
2.
I open up my app
3.
Then go to Generated access token.
4.
I use that token when it prompts me.
5.
I'm using the terminal on a Mac 10.11.4.
Just upgraded python from 2.7.6 to 2.7.9 and still incurring the same error message.
Error Message
W8006005A54:python ninekay$ python upload.py
Go to: https://www.dropbox.com/1/oauth2/authorize?response_type=code&client_id=qdrn1l679o14y86
Click "Allow" (you might have to log in first)
Copy the authorization code.
Enter the authorization code here: <REDACTED>
Traceback (most recent call last):
File "upload.py", line 21, in <module>
access_token, user_id = flow.finish(code)
File "/Library/Python/2.7/site-packages/dropbox-2.2.0-py2.7.egg/dropbox/client.py", line 1398, in finish
return self._finish(code, None)
File "/Library/Python/2.7/site-packages/dropbox-2.2.0-py2.7.egg/dropbox/client.py", line 1265, in _finish
response = self.rest_client.POST(url, params=params)
File "/Library/Python/2.7/site-packages/dropbox-2.2.0-py2.7.egg/dropbox/rest.py", line 316, in POST
return cls.IMPL.POST(*n, **kw)
File "/Library/Python/2.7/site-packages/dropbox-2.2.0-py2.7.egg/dropbox/rest.py", line 254, in POST
post_params=params, headers=headers, raw_response=raw_response)
File "/Library/Python/2.7/site-packages/dropbox-2.2.0-py2.7.egg/dropbox/rest.py", line 227, in request
raise ErrorResponse(r, r.read())
dropbox.rest.ErrorResponse: [400] u'invalid_grant'
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!