<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Right way to create shared link with password? (C#, .NET, ApiV2) in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Right-way-to-create-shared-link-with-password-C-NET-ApiV2/m-p/242129#M13491</link>
    <description>It looks like you just need to use `RequestedVisibility.Password.Instance` instead of `new RequestedVisibility().AsPassword`. &lt;BR /&gt;&lt;BR /&gt;Try that out and let me know if it doesn't help.</description>
    <pubDate>Mon, 18 Sep 2017 20:50:54 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-09-18T20:50:54Z</dc:date>
    <item>
      <title>Right way to create shared link with password? (C#, .NET, ApiV2)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Right-way-to-create-shared-link-with-password-C-NET-ApiV2/m-p/242089#M13487</link>
      <description>&lt;P&gt;I'm using following combo: C#, .NET, ApiV2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's the right way to create shared link with password?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Tried:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE style="font-family: Consolas; font-size: 13; color: gainsboro; background: #1e1e1e;"&gt;&lt;SPAN style="color: #4ec9b0;"&gt;Console&lt;/SPAN&gt;&lt;SPAN style="color: #b4b4b4;"&gt;.&lt;/SPAN&gt;WriteLine(&lt;SPAN style="color: #d69d85;"&gt;"-----&amp;nbsp;shareFile&amp;nbsp;function&amp;nbsp;starts&amp;nbsp;-----"&lt;/SPAN&gt;);
&lt;SPAN style="color: #4ec9b0;"&gt;RequestedVisibility&lt;/SPAN&gt;&amp;nbsp;visibility&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;=&lt;/SPAN&gt;&amp;nbsp;(password&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;==&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #569cd6;"&gt;null&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;?&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #569cd6;"&gt;null&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;:&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #4ec9b0;"&gt;RequestedVisibility&lt;/SPAN&gt;()&lt;SPAN style="color: #b4b4b4;"&gt;.&lt;/SPAN&gt;AsPassword);
&lt;SPAN style="color: #4ec9b0;"&gt;DateTime&lt;/SPAN&gt;&amp;nbsp;date&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #4ec9b0;"&gt;DateTime&lt;/SPAN&gt;&lt;SPAN style="color: #b4b4b4;"&gt;.&lt;/SPAN&gt;Now&lt;SPAN style="color: #b4b4b4;"&gt;.&lt;/SPAN&gt;AddDays(&lt;SPAN style="color: #b5cea8;"&gt;7&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;*&lt;/SPAN&gt;&amp;nbsp;dueInWeeks);
&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&amp;nbsp;sharedLinkSettings&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #4ec9b0;"&gt;SharedLinkSettings&lt;/SPAN&gt;(visibility,&amp;nbsp;password,&amp;nbsp;date);
&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&amp;nbsp;overAllSettings&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #4ec9b0;"&gt;CreateSharedLinkWithSettingsArg&lt;/SPAN&gt;(path,&amp;nbsp;sharedLinkSettings);
&lt;SPAN style="color: #569cd6;"&gt;try&lt;/SPAN&gt;
{
&amp;nbsp; &lt;SPAN style="color: #4ec9b0;"&gt;Console&lt;/SPAN&gt;&lt;SPAN style="color: #b4b4b4;"&gt;.&lt;/SPAN&gt;WriteLine(&lt;SPAN style="color: #d69d85;"&gt;"Sharing&amp;nbsp;\""&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;+&lt;/SPAN&gt;&amp;nbsp;path&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;+&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #d69d85;"&gt;"\"&amp;nbsp;file&amp;nbsp;starts"&lt;/SPAN&gt;);
&amp;nbsp; &lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&amp;nbsp;shared&amp;nbsp;&lt;SPAN style="color: #b4b4b4;"&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #569cd6;"&gt;await&lt;/SPAN&gt;&amp;nbsp;client&lt;SPAN style="color: #b4b4b4;"&gt;.&lt;/SPAN&gt;Sharing&lt;SPAN style="color: #b4b4b4;"&gt;.&lt;/SPAN&gt;CreateSharedLinkWithSettingsAsync(overAllSettings);
&amp;nbsp; &lt;SPAN style="color: #4ec9b0;"&gt;Console&lt;/SPAN&gt;&lt;SPAN style="color: #b4b4b4;"&gt;.&lt;/SPAN&gt;WriteLine(&lt;SPAN style="color: #d69d85;"&gt;"-----&amp;nbsp;shareFile&amp;nbsp;function&amp;nbsp;ends&amp;nbsp;-----"&lt;/SPAN&gt;);
&amp;nbsp; &lt;SPAN style="color: #569cd6;"&gt;return&lt;/SPAN&gt;&amp;nbsp;shared;
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;But gives error:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Exception thrown: 'Dropbox.Api.ApiException`1' in mscorlib.dll&lt;BR /&gt;Exception: Dropbox.Api.ApiException`1[Dropbox.Api.Sharing.CreateSharedLinkWithSettingsError]: settings_error/invalid_settings/...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure about RequestedVisibility thing.. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything works well without password related parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Quick working example would be very appreciated!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:19:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Right-way-to-create-shared-link-with-password-C-NET-ApiV2/m-p/242089#M13487</guid>
      <dc:creator>DropUser</dc:creator>
      <dc:date>2019-05-29T09:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Right way to create shared link with password? (C#, .NET, ApiV2)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Right-way-to-create-shared-link-with-password-C-NET-ApiV2/m-p/242129#M13491</link>
      <description>It looks like you just need to use `RequestedVisibility.Password.Instance` instead of `new RequestedVisibility().AsPassword`. &lt;BR /&gt;&lt;BR /&gt;Try that out and let me know if it doesn't help.</description>
      <pubDate>Mon, 18 Sep 2017 20:50:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Right-way-to-create-shared-link-with-password-C-NET-ApiV2/m-p/242129#M13491</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-09-18T20:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Right way to create shared link with password? (C#, .NET, ApiV2)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Right-way-to-create-shared-link-with-password-C-NET-ApiV2/m-p/242143#M13495</link>
      <description>Ah, I was blind that I didn't notice that at the first place. It works. Thanks!</description>
      <pubDate>Mon, 18 Sep 2017 21:52:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Right-way-to-create-shared-link-with-password-C-NET-ApiV2/m-p/242143#M13495</guid>
      <dc:creator>DropUser</dc:creator>
      <dc:date>2017-09-18T21:52:38Z</dc:date>
    </item>
  </channel>
</rss>

