Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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.
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.)
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.
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.)
Hi there!
If you need more help you can view your support options (expected response time for a 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!