Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

user3378165's avatar
user3378165
Explorer | Level 3
10 years ago
Solved

How do I create a shared link with expiry date from API (.Net SDK)?

Would you be able to give me an example how to add an expiration date to a shared link?   This is what I have so far:   Dropbox.Api.Sharing.SharedLinkSettings sls=new Dropbox.Api.Sharing.SharedLi...
  • Greg-DB's avatar
    10 years ago

    You can set an expiration for a new shared link using the .NET SDK like this:

     

    var settings = new SharedLinkSettings (expires: new DateTime (2016, 12, 25));
    SharedLinkMetadata sharedLinkMetadata = await this.client.Sharing.CreateSharedLinkWithSettingsAsync (path, settings);
    
    Console.WriteLine (sharedLinkMetadata.Url);
    Console.WriteLine (sharedLinkMetadata.Expires);

About Dropbox API Support & Feedback

Node avatar for 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!