cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

using php to get list of shared folders

using php to get list of shared folders

dragon-edify
Explorer | Level 3
Go to solution

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

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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:

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

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:

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?