One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
dragon-edify
3 years agoExplorer | Level 3
using php to get list of shared folders
I'm the new admin for our org's dropbox, and I'm trying to get my arms around everything that's been created in the last 10 years. In particular, I'm trying to get some details on shared folders. My understanding is I need to use the API to get the info I need. There are at least 500 shared folders, so going through them manually is proving to be quite time consuming.
I have some familiarity with php, so I'd prefer using that to do the work. The trouble is, I don't really know where to start, beyond registering my app in Dropbox.
I'd like to get a list of all shared folders (not just the ones owned by admin), with the following fields if possible: folder name, creation date, owner, "shared with list" (other users), folder path (as seen by admin), size.
Can someone point me in the right direction?
Thanks,
Bill
Dropbox doesn't offer an official SDK for PHP in particular, so you'll need to either call the HTTPS endpoints directly, or use a third party library.
To list all of the "namespaces" (which includes shared folders) for the team, you can use the /2/team/namespaces/list[/continue] endpoints.
To get the metadata for a shared folder, including the path, if any, for the specified user, you would call /2/sharing/get_folder_metadata. (The API doesn't return folder creation date or total size unfortunately, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.)
To list the members (including both owner and non-owners) of a shared folder and their access levels, you would use /2/sharing/list_folder_members[/continue].
Note that to access these sharing endpoints when connected to the team itself, you should use the "member file access" feature.
The following guides may be helpful:
- Greg-DB
Dropbox Staff
Dropbox doesn't offer an official SDK for PHP in particular, so you'll need to either call the HTTPS endpoints directly, or use a third party library.
To list all of the "namespaces" (which includes shared folders) for the team, you can use the /2/team/namespaces/list[/continue] endpoints.
To get the metadata for a shared folder, including the path, if any, for the specified user, you would call /2/sharing/get_folder_metadata. (The API doesn't return folder creation date or total size unfortunately, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.)
To list the members (including both owner and non-owners) of a shared folder and their access levels, you would use /2/sharing/list_folder_members[/continue].
Note that to access these sharing endpoints when connected to the team itself, you should use the "member file access" feature.
The following guides may be helpful:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 5 hours ago
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!