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
yannick11
2 years agoExplorer | Level 4
Getting content of folders using Dropbox API in Python not working anymore since last update
There has been an update in Dropbox and also in the API somewhere in the last week. I have a Python script to retrieve the content of a Dropbox folder and it is not working anymore. The call was just...
- 2 years ago
Can you clarify what you mean when you say "it is not working anymore"? For instance, what error or unexpected output do you get?
For reference, regardless of what feature set your team is using exactly, if you're trying to access a "team space", you'd need to get the root namespace ID from users_get_current_account, and use that as the root in with_path_root to access the team space. You can find more information in the Team Files Guide.
Greg-DB
Dropbox Staff
Can you clarify what you mean when you say "it is not working anymore"? For instance, what error or unexpected output do you get?
For reference, regardless of what feature set your team is using exactly, if you're trying to access a "team space", you'd need to get the root namespace ID from users_get_current_account, and use that as the root in with_path_root to access the team space. You can find more information in the Team Files Guide.
yannick11
2 years agoExplorer | Level 4
I got the following error:
This confirmed for me that it had to do something with the root_path. You pointed me in the right direction to use 'with_path_root' and i got it working again :).
For people having the same issue in the future, this is how i got it working again:
I use this code from github. The line with 'dbx.users_get_current_account' in the end is not sufficient anymore now. So, i changed
dbx.users_get_current_account()
to
root_namespace_id = dbx.users_get_current_account().root_info.root_namespace_id
dbx = dbx.with_path_root(dropbox.common.PathRoot('root', value = root_namespace_id))
and it works completely fine again.
Thanks @Greg-DB!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 4 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!