<?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: Trouble with link and setting expiry date in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177760#M7129</link>
    <description>&lt;P&gt;Hi Paul, you can find more information on this error in the documentation here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_Sharing_SharedLinkSettingsError_NotAuthorized.htm" rel="nofollow noreferrer"&gt;https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_Sharing_SharedLinkSettingsError_NotAuthorized.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In this case, it looks like the issue is that you're trying to set an expiration on a link using an account that doesn't have access to that feature.&lt;/P&gt;</description>
    <pubDate>Sat, 23 Apr 2016 00:29:19 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-04-23T00:29:19Z</dc:date>
    <item>
      <title>Trouble with link and setting expiry date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177759#M7128</link>
      <description>&lt;P&gt;I am creating a .NET app and all is working well so far with v2.1.&amp;nbsp; 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!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have read the .NET documentation, and searched the forums, but cannot get this working.&lt;/P&gt;
&lt;P&gt;This is my code:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt; Dropbox.Api.Sharing.&lt;/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;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;DateTime&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;.Today.AddDays(1));&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; file = (&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;FileMetadata&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)listView1.SelectedItems[0].Tag;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;//The code work if I replace the 'shSett' variable with 'null' in this line of code&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;shArgs = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; Dropbox.Api.Sharing.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;CreateSharedLinkWithSettingsArg&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;(file.PathDisplay, shSett);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;//this is the line where the error occurs&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; result = &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;await&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; client.Sharing.CreateSharedLinkWithSettingsAsync(shArgs);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help appreciated.&amp;nbsp; Hopefully I have provided enough information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Paul&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:33:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177759#M7128</guid>
      <dc:creator>Paul M.131</dc:creator>
      <dc:date>2019-05-29T09:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with link and setting expiry date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177760#M7129</link>
      <description>&lt;P&gt;Hi Paul, you can find more information on this error in the documentation here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_Sharing_SharedLinkSettingsError_NotAuthorized.htm" rel="nofollow noreferrer"&gt;https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_Sharing_SharedLinkSettingsError_NotAuthorized.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In this case, it looks like the issue is that you're trying to set an expiration on a link using an account that doesn't have access to that feature.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2016 00:29:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177760#M7129</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-04-23T00:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with link and setting expiry date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177761#M7130</link>
      <description>&lt;P&gt;Hi Gregory,&lt;/P&gt;
&lt;P&gt;Many thanks for your response and advice, and you were indeed correct, so I have now upgraded from the free account to Pro.&lt;/P&gt;
&lt;P&gt;However, I now have a new problem, which is "Error in call to API function \"sharing/create_shared_link_with_settings\": request body: settings.expires: time data '2016-04-24T00:00:00' does not match format '%Y-%m-%dT%H:%M:%SZ'"}.&lt;/P&gt;
&lt;P&gt;As far as I can see, the problem is arising in the Dropbox.Api.SharedLinkSettingsEncoder class, which has a DateTime value passed in, and where the "expires"&amp;nbsp;value is:&lt;/P&gt;
&lt;P&gt;{{"path":"/Chrysanthemum.jpg","settings":{"expires":"2016-04-24T00:00:00"}&lt;/P&gt;
&lt;P&gt;Using the API Explorer and reading the error message, it appears that there should be a "Z" appended to the time in the settings, but I'm not sure how to achieve this.&lt;/P&gt;
&lt;P&gt;Not sure if it has anything to do with being a UK time format.&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2016 05:29:07 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177761#M7130</guid>
      <dc:creator>Paul M.131</dc:creator>
      <dc:date>2016-04-23T05:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with link and setting expiry date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177762#M7131</link>
      <description>&lt;P&gt;I believe that should be fixed in &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/releases/tag/v3.0.6" target="_blank" rel="nofollow noreferrer"&gt;version 3.0.6&lt;/A&gt;. Please update to that and let me know if it doesn't help.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2016 05:31:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177762#M7131</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-04-23T05:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with link and setting expiry date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177763#M7132</link>
      <description>&lt;P&gt;Fantastic Gregory.&amp;nbsp; I have updated the Dropbox.Api and it now works perfectly.&lt;/P&gt;
&lt;P&gt;Many thanks for your quick response and helpful advice.&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2016 06:05:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trouble-with-link-and-setting-expiry-date/m-p/177763#M7132</guid>
      <dc:creator>Paul M.131</dc:creator>
      <dc:date>2016-04-23T06:05:11Z</dc:date>
    </item>
  </channel>
</rss>

