One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
GustavBrock
7 days agoNew member | Level 1
Owner account of shared folder
Using C# and the Dropbox API and having attached shared folders from another Dropbox accounts, how do I retrieve the Dropbox account ids that own these shared folders?
Both my account and the owners of the shared folders use Dropbox Basic, thus no teams.
I need this account id to identify the folder holding the files reported to my webhook.
Hi GustavBrock,
Sending a request to /sharing/list_folder_members endpoint will return the members of a shared folder.
For member groups, there will be a property "group_id" per member group. For individual members, there will be an "account_id" property per member.
- DB-Des
Dropbox Engineer
Hi GustavBrock,
Sending a request to /sharing/list_folder_members endpoint will return the members of a shared folder.
For member groups, there will be a property "group_id" per member group. For individual members, there will be an "account_id" property per member.
- GustavBrockNew member | Level 1
Thanks!
I have the Dropbox.Api package installed to serve other tasks. Could this be used to retrieve the account_id? I can retrieve the folder metadata but this seems not to include the account_id.
- DB-Des
Dropbox Engineer
Hi GustavBrock,
In order to further assist, could you provide the following?
- the name and version number of the platform and SDK/library you are using, if any
- the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
- the full text of any error or unexpected output
- GustavBrockNew member | Level 1
It is 7.0.0
I got it working. The https call responded with a missing scope error, because I hadn't set permission for sharing_read. That I did and reauthorized, and now also the Dropbox.Api code runs:
internal async Task ListFiles(DropboxClient dbx) { List<Metadata> allFolders = new List<Metadata>(); // <snip> .. fill allFolders foreach (var item in allFolders) { if (item.IsFolder) { Console.WriteLine($"{item.AsFolder.Id} - {item.Name}"); string sharedFolderId = item.AsFolder.SharingInfo.SharedFolderId; var folderMembers = await dbx.Sharing.ListFolderMembersAsync(sharedFolderId); var owner = folderMembers.Users.Where(user => user.AccessType.IsOwner).FirstOrDefault(); if (owner != null) { Console.WriteLine($"Owner Account ID: {owner.User.AccountId}"); } else { Console.WriteLine("Owner not found."); } } } }
Thank you. Have a nice weekend!
- GustavBrockNew member | Level 1
DB-Des: I forgot to return a thank you for your fast attention. Much appreciated!
- DB-Des
Dropbox Engineer
My pleasure! I'm glad to see you got it working.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,951 PostsLatest Activity: 16 minutes 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!