We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

andrzejkul's avatar
andrzejkul
New member | Level 2
7 years ago
Solved

Get shared links of all files in App folder

Hello.

I'm using Dropbox Api for .NET. I would like to list all files together with their shared links. Here's my current code:

var listFolderResult = await _dropboxClient.Files.ListFolderAsync(String.Empty, recursive: true);
var files = listFolderResult.Entries.Where(x => x.IsFile).Select(x => x.AsFile);
foreach (var file in files)
{
    var listSharedLinksResult = await _dropboxClient.Sharing.ListSharedLinksAsync(file.PathDisplay);
}

It works, but I have to make a request for shared link for every file and that is time-consuming. I tested this code on account with 50 files and the whole operation took about 1 minute. Is there any faster way to get all files (I need only names and sizes) with their shared links?

Best regards.

  • No, unfortunately there isn't a way to retrieve shared links along with the file listing, or a way to get shared links in bulk. I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago

    No, unfortunately there isn't a way to retrieve shared links along with the file listing, or a way to get shared links in bulk. I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 8 hours ago
410 Following

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 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!