You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Phoggbank
4 years agoExplorer | Level 3
Error in files_list_folder method
I am still trying to get over the initial "hump" writing my first Python Dropbox API. Eventually I would like to iterate through all the folders in a Dropbox account, then for each of those folders, ...
Greg-DB
4 years agoDropbox Staff
This "The given OAuth 2 access token is malformed" error is referring to the oauth2_access_token parameter value you're passing to the Dropbox constructor. It means that the value you're passing in is not a valid Dropbox access token. You'll need to correct that to make sure you're passing in a valid access token for that parameter, and make sure there are no stray characters, e.g., extra whitespace, etc.
In the code you shared here, you have "[appl id]" as the value for that parameter, which I presume is just a placeholder you used to redact the actual value. The actual value should be either a short-lived access token (which starts with "sl.") or a long-lived access token (which doesn't start with "sl.", and would generally be 64 characters long). You can find more information on how to get an access token in the OAuth Guide.
Given the term "appl id" it sounds like it's possible that you're actually passing in your "app key", not an access token. Note that your "app key" just identifies an app, and does not enable access to an account. App keys are generally just around 15 characters long.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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!