I am creating a .NET app and all is working well so far with v2.1. I can share a link, but if try to add an expiry date for the link it fails at the "CreateSharedLinkWithSettingsAsync" method, with a "settings_error/not_authorized/.." error!
I have read the .NET documentation, and searched the forums, but cannot get this working.
This is my code:
Dropbox.Api.Sharing.CreateSharedLinkWithSettingsArg shArgs = null;
//set the expiry date
Dropbox.Api.Sharing.SharedLinkSettings shSett = new Dropbox.Api.Sharing.SharedLinkSettings(null, null, DateTime.Today.AddDays(1));
var file = (FileMetadata)listView1.SelectedItems[0].Tag;
//The code work if I replace the 'shSett' variable with 'null' in this line of code
shArgs = new Dropbox.Api.Sharing.CreateSharedLinkWithSettingsArg(file.PathDisplay, shSett);
//this is the line where the error occurs
var result = await client.Sharing.CreateSharedLinkWithSettingsAsync(shArgs);
Any help appreciated. Hopefully I have provided enough information.
Paul