Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Tobiwan
4 years agoNew member | Level 2
Problem with listing team folder with python SDK: Error in call to API function "files/list_folder
Hi Everyone!
First of all im new to this so please dont take me to harsh if im using wrong vocabulary or im saying dumb stuff haha 😄
So i have a big folder which contains 10.000 folders each co...
Здравко
4 years agoLegendary | Level 20
Tobiwan wrote:...
The subfolders get printed only to around 1500 and in a weird order. For the 1500 i probably have to use recusion again right but how do i activate it in that context? ...
Hi Tobiwan,
Currently, in your code, you are using only files_list_folder method. This method starts content listing process and can fetch the list entirely if it's small enough, but you don't have to rely on! Within the retrieved result is a field 'has_more' (i.e. are some entries lefts to be fetched). If there are, you have to continue listing using files_list_folder_continue method until there are no more entries left. On every pagination step, cursor take place within result; a cursor which you have to use as argument on following call. In such a way you will no more be limited to entries number able to be got out from single call.
Recursion can be activated using the corresponding argument (the same named) in the initial listing step. 😉 There are other parameters too that control the listing process; take a look there. Listing order can't get controlled; it's something internal, you shouldn't rely on.
Hope this helps.
Greg-DB
Dropbox Community Moderator
4 years agoTobiwan As Здравко instructed, make sure you implement support for the pagination in order to be able to retrieve all entries. Refer to the documentation they linked to for more information.
As for sharing_create_shared_link_with_settings, you can call it the same way, like this:
output = dbx.Dropbox(dropbox_token).with_path_root(dbx.common.PathRoot.root(team_space_namespace_id)).sharing_create_shared_link_with_settings("/test.txt")
print(output)
Be sure to plug in your actual path, in place of my example "/test.txt". You can programmatically get the path for an entry from Metadata.path_lower, for instance.
About Discuss Dropbox Developer & API
Make connections with other developers
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, Facebook or Instagram.
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!