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
venkate
4 years agoExplorer | Level 3
file list from shared folder dropbox rest api python
I need to create a data frame out of attributes and share URL of all the files in a directory and its sub-directories
the code am using is
for entry in dbx.files_list_folder('/2.info_copy',rec...
- 4 years ago
You can use the API to list the files in any folder in the connected account, whether or not the folder is shared. I recommend reading the File Access Guide and Team Files Guide for reference.
Looking at your code, there are a few things to note:
- You are not guaranteed to get everything back in one call to files_list_folder. You need to implement files_list_folder_continue as well. Refer to the documentation linked there for more information.
- The sharing_create_shared_link method is deprecated. Please use sharing_create_shared_link_with_settings instead.
- The sharing_create_shared_link_with_settings method is only for creating new links, and will raise an error if a link already exists for the item. You can use sharing_list_shared_links to get existing shared links for items.
Greg-DB
Dropbox Staff
You can use the API to list the files in any folder in the connected account, whether or not the folder is shared. I recommend reading the File Access Guide and Team Files Guide for reference.
Looking at your code, there are a few things to note:
- You are not guaranteed to get everything back in one call to files_list_folder. You need to implement files_list_folder_continue as well. Refer to the documentation linked there for more information.
- The sharing_create_shared_link method is deprecated. Please use sharing_create_shared_link_with_settings instead.
- The sharing_create_shared_link_with_settings method is only for creating new links, and will raise an error if a link already exists for the item. You can use sharing_list_shared_links to get existing shared links for items.
sakoht
3 years agoExplorer | Level 3
It would be really great to see the snip of code that actually accomplishes what the OP describes above. Pointing to the manual is way less helpful, as it spends a bunch of time on abstractions. Please just show the code? You have to do DropboxTeam() instead of Dropbox(). The methods are different. Listing things gives back an object that isn't iterable, doesn't seem to contain a list. This may be obvious to someone ...but not to someone who didn't write it.
- sakoht3 years agoExplorer | Level 3
This StackOverflow has a code snip:
If this has to be this complicated to list the top-level of a team folder, it would be great to have it somewhere clearly visible in the docs as an example!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,882 PostsLatest Activity: 7 hours 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!