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
Ashley B.15
9 years agoHelpful | Level 7
https://api.dropboxapi.com/2/sharing/list_folders should return all folders user can access?
Hi,
I've been looking at the below endpoint, forgive me if this is a silly question. Should this return all folders I can access in the dropbox ui?
https://api.dropboxapi.com/2/sharing/list_folde...
Greg-DB
9 years agoDropbox Staff
Hi Ashley, the /sharing/list_folders[/continue] endpoints should list all of the shared folders the specified user has access to. In your example, is "FOLDER" missing, or is it only "SUB FOLDER" that you're expecting and not seeing?
The endpoint wouldn't list the subfolders (e.g., "SUB FOLDER") or other contents of those shared folders, in case that's what you mean (since the subfolders aren't themselves shared folders, but are just in shared folders). You'd have to then call /files/list_folder[/continue] for each shared folder you want, if so.
Also, make sure you always check for a cursor in the response. If there is one, it indicates that there are more shared folders to return, and you should call /sharing/list_folders/continue to get them.
In any case, if you're still seeing issues with this, please share some sample code and output to help illustrate it.
- Inderjeetdev2 years agoHelpful | Level 5
As mentioned in https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_folders , API: https://api.dropboxapi.com/2/sharing/list_folders should return cursor variable, so that I can use it in https://api.dropboxapi.com/2/sharing/list_folders/continue API to get sub-folders, however https://api.dropboxapi.com/2/sharing/list_folders is not returning cursor variable in response. How do I get get cursor variable?
- Greg-DB2 years agoDropbox Staff
Inderjeetdev The cursor field will be "Present if there are additional shared folders that have not been returned yet.". If the cursor is not returned, that means that there are no more shared folders to return, and so it is not necessary to call /2/sharing/list_folders/continue.
Also, note that the /2/sharing/list_folders[/continue] endpoints only return shared folders themselves, not the contents of shared folders. To list all of the contents of any particular folder, you would use /2/files/list_folder[/continue] instead.
- Inderjeetdev2 years agoHelpful | Level 5
Greg-DB There are still sub-sub-folders inside the shared folder which are not returned by the API https://api.dropboxapi.com/2/sharing/list_folders . I can access sub-sub-folders by direct link, so it means they are shared to me, API is not fetching them (it fetched only two sub-folders) however as you mentioned that this API only return shared folders themselves, not the contents of shared folders, so, I can ignore it for now because I need file names.
Main issue is that if I depend on https://api.dropboxapi.com/2/files/list_folder , it needs 'Dropbox-API-Select-User', so it don't allow to access shared team folder outside a user's folder. How do I access them through API?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 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!