<?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: Getting the shared link using the deprecated GetSharedLinksAsync(path) in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-the-shared-link-using-the-deprecated-GetSharedLinksAsync/m-p/205104#M9896</link>
    <description>&lt;P&gt;Hi again, Greg the Dropmaster! Thank you so much, I finally did it this way, so I control if the link is already created and act if so&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@BEEAA17610EBE252DA0E57250B296A61/images/emoticons/1f642.png" alt=":slight_smile:" title=":slight_smile:" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; var link = await dbx.Sharing.ListSharedLinksAsync(remoteFilePath);
 if(link.Links.Count == 0)
 {&lt;BR /&gt;     var result = await dbx.Sharing.CreateSharedLinkWithSettingsAsync(remoteFilePath);
     string url = result.Url;
     Console.WriteLine("The url for sharing " + remoteFilePath + " is: " + url);
 }
 else
 {
     string url = link.Links[0].Url;
     Console.WriteLine("(ALREADY GENERATED) The url for sharing " + remoteFilePath + " is: " + url);
 }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You made my friday, Greg! &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@88EA68687A32E94CAA74CC5EF63A398A/images/emoticons/1f60e.png" alt=":sunglasses:" title=":sunglasses:" /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2017 07:42:09 GMT</pubDate>
    <dc:creator>Gonzo345</dc:creator>
    <dc:date>2017-02-03T07:42:09Z</dc:date>
    <item>
      <title>Getting the shared link using the deprecated GetSharedLinksAsync(path)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-the-shared-link-using-the-deprecated-GetSharedLinksAsync/m-p/204959#M9880</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm facing problems retrieving a shared link which is already created. I'm basically trying to "create" the Shared Link every time I upload a file and storing that URL on a DB but I'm stuck on the "shared_link_aready_exists" part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the .NET API and I tried to use the&lt;/P&gt;&lt;PRE&gt;DropboxClient.Sharing.CreateSharedLinkWithSettingsAsync(remotePath);&lt;/PRE&gt;&lt;P&gt;but even if the file is being overwritten, if it already has a Shared Link created, it will give the "shared_link_already_exists" return, stopping there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been taking a look at the API and looks like&lt;/P&gt;&lt;PRE&gt;DropboxClient.Sharing.GetSharedLinksAsync(remotePath)&lt;/PRE&gt;&lt;P&gt;is my method, but it only works if the link is already created. And poorly, this method is deprecated, so it will surely stop working anytime...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess&amp;nbsp;there is a way to control that but I'm in a point that I don't move forward. Could anybody help me? Many thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:26:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-the-shared-link-using-the-deprecated-GetSharedLinksAsync/m-p/204959#M9880</guid>
      <dc:creator>Gonzo345</dc:creator>
      <dc:date>2019-05-29T09:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the shared link using the deprecated GetSharedLinksAsync(path)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-the-shared-link-using-the-deprecated-GetSharedLinksAsync/m-p/205017#M9885</link>
      <description>&lt;P&gt;If a shared link already exists for a file or folder, you can use &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Sharing_Routes_SharingUserRoutes_ListSharedLinksAsync_1.htm" target="_self"&gt;ListSharedLinksAsync&lt;/A&gt;&amp;nbsp;with path as the path to the desired file or folder and&amp;nbsp;directOnly=true to get the existing link.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 18:12:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-the-shared-link-using-the-deprecated-GetSharedLinksAsync/m-p/205017#M9885</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-02-02T18:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the shared link using the deprecated GetSharedLinksAsync(path)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-the-shared-link-using-the-deprecated-GetSharedLinksAsync/m-p/205104#M9896</link>
      <description>&lt;P&gt;Hi again, Greg the Dropmaster! Thank you so much, I finally did it this way, so I control if the link is already created and act if so&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@BEEAA17610EBE252DA0E57250B296A61/images/emoticons/1f642.png" alt=":slight_smile:" title=":slight_smile:" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; var link = await dbx.Sharing.ListSharedLinksAsync(remoteFilePath);
 if(link.Links.Count == 0)
 {&lt;BR /&gt;     var result = await dbx.Sharing.CreateSharedLinkWithSettingsAsync(remoteFilePath);
     string url = result.Url;
     Console.WriteLine("The url for sharing " + remoteFilePath + " is: " + url);
 }
 else
 {
     string url = link.Links[0].Url;
     Console.WriteLine("(ALREADY GENERATED) The url for sharing " + remoteFilePath + " is: " + url);
 }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You made my friday, Greg! &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@88EA68687A32E94CAA74CC5EF63A398A/images/emoticons/1f60e.png" alt=":sunglasses:" title=":sunglasses:" /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 07:42:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-the-shared-link-using-the-deprecated-GetSharedLinksAsync/m-p/205104#M9896</guid>
      <dc:creator>Gonzo345</dc:creator>
      <dc:date>2017-02-03T07:42:09Z</dc:date>
    </item>
  </channel>
</rss>

