Learn how to make the most out of the Dropbox Community here 💙!
Forum Discussion
Dextral
6 years agoNew member | Level 2
Python 3.7 API upload error
Basically, I am having a similar problem to what a user named delta was having at the thread located via https://www.dropboxforum.com/t5/Discuss-Developer-API/Python-3-5-API-upload-error/m-p/317699#M...
Greg-DB
Dropbox Staff
6 years agoThis error message indicates that the access token you're using isn't of the expected format. You appear to be storing your access token in that "dropbox_access_token" field. To be clear though, you've redacted it for this forum post, correct? (If not, note that attempting to just uses the 'x's will fail. You need to replace it with an actual access token from Dropbox.)
Can you double check that the access token string you have saved there is the exact value you received from Dropbox when initially retrieving the access token? It will generally be a 64 character string of letters, numbers, and - or _. Make sure there aren't any extra characters accidentally added on, for instance.
Also, how are you loading that string into the Dropbox 'client' object? Please make sure it isn't accidentally getting modified somewhere along the way.
Another thing you can do is to add some extra logging of the network call, so you can inspect what is actually getting sent:
import http.client as http_client http_client.HTTPConnection.debuglevel = 1
(Make sure you don't post your access token here.)
About Discuss Dropbox Developer & API
Make connections with other developers810 PostsLatest Activity: 3 days ago
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 or Facebook.
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!