cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
If you’ve changed your email address, now's the perfect time to update it on your Dropbox account and we’re here to help! Learn more 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: 

File permissions in shared folders

File permissions in shared folders

boby1
Explorer | Level 3

Hi,

 

I'm using Dropbox business team and want to programmatically list permissions on a file or folder.

Using the apis, I'm able to retrieve the list of files and folders + a couple of properties. 

However I'm unable to find a way to list the permissions.

Language : C#

 

Whic api should I use?

Do you have a working sample?

 

Thanks.

3 Replies 3

Greg-DB
Dropbox Staff

The user's access to files in a shared folder are determined by their access level in the shared folder itself.

 

If you're using the official API v2 .NET SDK, to check the user's current access level for a particular shared folder, you can use GetFolderMetadata. Or, you can list all of the shared folders the user currently has access to with ListFolders / ListFoldersContinue

 

(On the HTTP API itself, those are /2/sharing/get_folder_metadata and /2/sharing/list_folders / /2/sharing/list_folders/continue respectively.)

boby1
Explorer | Level 3

We need to know who has permissions on the file or folder, not what permission a specific user has on a file or folder.

Using your solution, if a company has 1000 users, we would need the check the permissions of the 1000 users one by one against a given file to determine the access list.

Greg-DB
Dropbox Staff

To list all of the members of a shared folder, you would use ListFolderMembers and ListFolderMembersContinue. (Those correspond to /2/sharing/list_folder_members and /2/sharing/list_folder_members/continue).

 

Likewise, for a shared file, not just a file in a shared folder, you would use ListFileMembers and ListFileMembersContinue. There's also a batch version for that: ListFileMembersBatch. (Respectively: /2/sharing/list_file_members, /2/sharing/list_file_members/continue, and /2/sharing/list_file_members/batch.)

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    boby1 Explorer | Level 3
What do Dropbox user levels mean?