I'm using following combo: C#, .NET, ApiV2
What's the right way to create shared link with password?
Tried:
Console.WriteLine("----- shareFile function starts -----");
RequestedVisibility visibility = (password == null ? null : new RequestedVisibility().AsPassword);
DateTime date = DateTime.Now.AddDays(7 * dueInWeeks);
var sharedLinkSettings = new SharedLinkSettings(visibility, password, date);
var overAllSettings = new CreateSharedLinkWithSettingsArg(path, sharedLinkSettings);
try
{
Console.WriteLine("Sharing \"" + path + "\" file starts");
var shared = await client.Sharing.CreateSharedLinkWithSettingsAsync(overAllSettings);
Console.WriteLine("----- shareFile function ends -----");
return shared;
}
But gives error:
Exception thrown: 'Dropbox.Api.ApiException`1' in mscorlib.dll
Exception: Dropbox.Api.ApiException`1[Dropbox.Api.Sharing.CreateSharedLinkWithSettingsError]: settings_error/invalid_settings/...
Not sure about RequestedVisibility thing..
Everything works well without password related parameters.
Quick working example would be very appreciated!
Thanks