Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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.SharedLinkSettings(); ???? var result = await dbx.Sharing.CreateSharedLinkWithSettingsAsync(remotePath,sls);
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);
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);
Thank you! Working perfectly!
Hi there!
If you need more help you can view your support options (expected response time for a 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!