Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
GustavBrock
10 months 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...
- 10 months 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
10 months 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.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!