<?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: Get ( I don't want to create it ) the link of a file or folder if it does exist already. in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188632#M8020</link>
    <description>&lt;P&gt;okay I realized only today all my links are expired.&lt;BR /&gt;&lt;BR /&gt;I put together something like this but it is incomplete..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;private List&amp;lt;SharedLinkMetadata&amp;gt; retrieveAllSharedLinks(DbxClientV2 client ) throws DbxException&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;SharedLinkMetadata&amp;gt; result = new ArrayList&amp;lt;SharedLinkMetadata&amp;gt;(); &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListSharedLinksResult resultList = client.sharing().listSharedLinksBuilder().withPath(").withDirectOnly(true).start();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (true) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (SharedLinkMetadata sharedLinkMetadata : resultList.getLinks()) { &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result.add(sharedLinkMetadata);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!resultList.getHasMore()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //resultList = client.sharing().listSharedLinks().&amp;nbsp;&amp;nbsp; I don't know what to put in this line here&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return result;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It misses the pagination since I don't know how to get the others...&lt;BR /&gt;I looked the whole Internet but I couldn't get this snippet of code.&lt;BR /&gt;&lt;BR /&gt;I bet it should be something similar to &lt;BR /&gt;&amp;nbsp;resultList = client.files().listFolderContinue(resultList.getCursor());&lt;BR /&gt;&lt;BR /&gt;but it's for sharedlinks.&lt;BR /&gt;&lt;BR /&gt;Will you give me further help?&amp;nbsp; I beg you...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2016 00:16:51 GMT</pubDate>
    <dc:creator>Aldo M.2</dc:creator>
    <dc:date>2016-09-09T00:16:51Z</dc:date>
    <item>
      <title>Get ( I don't want to create it ) the link of a file or folder if it does exist already.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188630#M8018</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am buildng an app in Java Dropbox API V2 that would display for each file or folder a link &lt;STRONG&gt;only&lt;/STRONG&gt; &lt;STRONG&gt;if the owner has created a link for it.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The application is this a&lt;A href="https://dl.dropboxusercontent.com/1/view/ekdnn0tw7s7c4ah/Apps/Shutter/Workspace%201_011.png" target="_blank" rel="nofollow noreferrer"&gt;pplication screenshot.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I'll explain better now.&lt;BR /&gt;I know it's possible to create from the dropbox.com website a link for any of the items &lt;A href="https://www.dropbox.com/s/ut9wr7tlappis3q/Workspace%201_012.png?dl=0" target="_blank" rel="nofollow noreferrer"&gt;create a link screenshot. &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;without specifying any email address to who I am sharing the file with &lt;A href="https://dl.dropboxusercontent.com/1/view/7q05r4a1hy7bbno/Apps/Shutter/Workspace%201_014.png" target="_blank" rel="nofollow noreferrer"&gt;anyone can view screenshot.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I noticed all these items where a link have been created are in the links section &lt;A href="https://dl.dropboxusercontent.com/1/view/r8kw3sn2kohwgop/Apps/Shutter/Workspace%201_013.png" target="_blank" rel="nofollow noreferrer"&gt;link section screenshot.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;My questions are:&lt;/P&gt;
&lt;P&gt;1)Since for a file or folder a link might have been created or not from the owner, how can I discover for each file or folder if a link does exist ?&lt;/P&gt;
&lt;P&gt;2)In case a link does exist, how can I get it via API?&lt;BR /&gt;&lt;BR /&gt;In case it does not exist I don't want to create one.&lt;/P&gt;
&lt;P&gt;I hope my questions make sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thank you in advance for your hard work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:30:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188630#M8018</guid>
      <dc:creator>Aldo M.2</dc:creator>
      <dc:date>2019-05-29T09:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get ( I don't want to create it ) the link of a file or folder if it does exist already.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188631#M8019</link>
      <description>&lt;P&gt;You can use &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links" target="_blank" rel="nofollow noreferrer"&gt;/sharing/list_shared_links,&lt;/A&gt;&amp;nbsp;passing the path to the file. If you only want links to that exact path (and not parent folders), use direct_only=true.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 23:52:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188631#M8019</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2016-09-07T23:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get ( I don't want to create it ) the link of a file or folder if it does exist already.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188632#M8020</link>
      <description>&lt;P&gt;okay I realized only today all my links are expired.&lt;BR /&gt;&lt;BR /&gt;I put together something like this but it is incomplete..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;private List&amp;lt;SharedLinkMetadata&amp;gt; retrieveAllSharedLinks(DbxClientV2 client ) throws DbxException&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;SharedLinkMetadata&amp;gt; result = new ArrayList&amp;lt;SharedLinkMetadata&amp;gt;(); &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListSharedLinksResult resultList = client.sharing().listSharedLinksBuilder().withPath(").withDirectOnly(true).start();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (true) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (SharedLinkMetadata sharedLinkMetadata : resultList.getLinks()) { &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result.add(sharedLinkMetadata);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!resultList.getHasMore()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //resultList = client.sharing().listSharedLinks().&amp;nbsp;&amp;nbsp; I don't know what to put in this line here&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return result;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It misses the pagination since I don't know how to get the others...&lt;BR /&gt;I looked the whole Internet but I couldn't get this snippet of code.&lt;BR /&gt;&lt;BR /&gt;I bet it should be something similar to &lt;BR /&gt;&amp;nbsp;resultList = client.files().listFolderContinue(resultList.getCursor());&lt;BR /&gt;&lt;BR /&gt;but it's for sharedlinks.&lt;BR /&gt;&lt;BR /&gt;Will you give me further help?&amp;nbsp; I beg you...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 00:16:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188632#M8020</guid>
      <dc:creator>Aldo M.2</dc:creator>
      <dc:date>2016-09-09T00:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get ( I don't want to create it ) the link of a file or folder if it does exist already.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188633#M8021</link>
      <description>&lt;P&gt;Untested, but I believe it's just this:&lt;/P&gt;
&lt;PRE&gt;client.sharing().listSharedLinksBuilder()&lt;BR /&gt;    .withPath(")&lt;BR /&gt;    .withDirectOnly(true)&lt;BR /&gt;    .withCursor(resultList.getCursor())&lt;BR /&gt;.start();&lt;/PRE&gt;
&lt;P&gt;See the documentation:&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links" rel="nofollow noreferrer"&gt;https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 01:22:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188633#M8021</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2016-09-09T01:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get ( I don't want to create it ) the link of a file or folder if it does exist already.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188634#M8022</link>
      <description>&lt;P&gt;Also, you may want to drop the .withPath(") in both calls if you're just trying to search for all links.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 01:40:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188634#M8022</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2016-09-09T01:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get ( I don't want to create it ) the link of a file or folder if it does exist already.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188635#M8023</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I gave up with getting the links all at once and I fetch the shared links once per time.&lt;BR /&gt;I put back the .withPath(path) and I passed the path wanted without any cycle to get the others.&lt;/P&gt;
&lt;P&gt;It's too difficult to figure out the pagination to get all the links at once without a template snippet in at least one of the languages among C, Python or Java or another.&lt;BR /&gt;&lt;BR /&gt;Thanks for your time again.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 04:34:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-I-don-t-want-to-create-it-the-link-of-a-file-or-folder-if-it/m-p/188635#M8023</guid>
      <dc:creator>Aldo M.2</dc:creator>
      <dc:date>2016-09-09T04:34:30Z</dc:date>
    </item>
  </channel>
</rss>

