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
MooMoo_polar
9 months agoExplorer | Level 3
API for download shared link files
Hello.
I'm writing writing a python script to download the shared link folder from others.
I refer to this topic:
I use files_list_folder to list the files in the shared folder, but this error occurs
BadInputError: BadInputError('c3d3be1988e540f5a87e5f63cdc2db0c', 'Error in call to API function "files/list_folder": Recursive list folder is not supported for shared link.')
I'm very new to API. Is there any method or suggestion to download all files in the certain folder?
Thank you in advance.
- ЗдравкоLegendary | Level 20
Hi MooMoo_polar,
The error message is clear enough, I think. Just forget to list the entire link (all its directories levels recursively) at once. That's it. First list the pointed folder itself (in non recursive way) and after that "by hands" all nested folder (again, in non recursive way) and so forth.
Hope this clarifies matter.
PS: You can get idea how that can be done here. Just "translate" it to Python. 😉
- Greg-DBDropbox Staff
MooMoo_polar Здравко is correct; when using 'shared_link', using 'recursive: true' is not supported; you'd need to use 'recursive: false' and handle recursion in your own code if/as needed. You can find the documentation for the files_list_folder method in the Python SDK here.
- MooMoo_polarExplorer | Level 3
Thank you for the explanation.
I'm working on the folder which has many levels of nested-folder inside.
In this case, I have to point each of them manaully until the deepest nested folder.Thank you for the example code, it's clearly understand now 🙂
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,888 PostsLatest Activity: 16 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!