One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
GustavBrock
8 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...
- 8 days ago
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.
GustavBrock
7 days agoNew 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!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,951 PostsLatest Activity: 12 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!