Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.
Forum Discussion
MooMoo_polar
2 years 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.
3 Replies
- Здравко2 years agoLegendary | 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-DB2 years ago
Dropbox Community Moderator
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_polar2 years agoExplorer | 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.6,039 PostsLatest Activity: 2 days ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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!