Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
TAP
8 years agoExplorer | Level 4
API endpoint for list of folder names and paths?
Is there an endpoint that will return a list of folder names and paths? Use-case: presenting my users with a dropdown containing various folders they may send a file to.
- Yes, to list files and folders in Dropbox, you should use the /2/files/list_folder[/continue] endpoints:
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue
To list root, use the empty string "" as the path. To list a non-root path, pass in the path like "/path/to/folder".
4 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
Yes, to list files and folders in Dropbox, you should use the /2/files/list_folder[/continue] endpoints:
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue
To list root, use the empty string "" as the path. To list a non-root path, pass in the path like "/path/to/folder". - TAP8 years agoExplorer | Level 4Thanks Greg!
- Yohancef6 years agoNew member | Level 2
Hi,
What's the C# equivalent of path: "" for the 'Files.ListFolderAsync(path)' method to display to root folder?
It seems to want it in 'id: somevalue' format.
Thanks.
- Greg-DB6 years ago
Dropbox Community Moderator
Yohancef With the .NET SDK, you would also pass an empty string to list the root folder. That would look like this:
var list = await client.Files.ListFolderAsync(string.Empty);
or:
var list = await client.Files.ListFolderAsync("");
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!