<?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 Distinguish shared link and preview links in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinguish-shared-link-and-preview-links/m-p/272638#M16187</link>
    <description>&lt;P&gt;Am I correct to assume the following:&lt;BR /&gt;&lt;BR /&gt;a shared link will alawys have /s/ in the&amp;nbsp;URL&lt;BR /&gt;&lt;BR /&gt;The original preview link is of the from : &lt;A href="http://www.dropbox.com/home/path/to/file?preview=filename.pdf" target="_blank"&gt;www.dropbox.com/home/path/to/file?preview=filename.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;What I am trying to do&lt;BR /&gt;&lt;/STRONG&gt;I have a list of URLs in my DB, and I need to use the API to generate a preview&amp;nbsp;and embed it in a webpage&lt;BR /&gt;&lt;BR /&gt;for the original preview links, I am parsing the lnk to extract the path and then use the&amp;nbsp;get_preview endpoint&lt;BR /&gt;for the shared link, I am thinking about calling&amp;nbsp;&lt;SPAN&gt;get_shared_link_metadata and from there get the id and call&amp;nbsp;get_preview&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;&lt;EM&gt;Is there an easier way to do this?&lt;/EM&gt;&lt;/U&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:13:53 GMT</pubDate>
    <dc:creator>Mhd</dc:creator>
    <dc:date>2019-05-29T09:13:53Z</dc:date>
    <item>
      <title>Distinguish shared link and preview links</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinguish-shared-link-and-preview-links/m-p/272638#M16187</link>
      <description>&lt;P&gt;Am I correct to assume the following:&lt;BR /&gt;&lt;BR /&gt;a shared link will alawys have /s/ in the&amp;nbsp;URL&lt;BR /&gt;&lt;BR /&gt;The original preview link is of the from : &lt;A href="http://www.dropbox.com/home/path/to/file?preview=filename.pdf" target="_blank"&gt;www.dropbox.com/home/path/to/file?preview=filename.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;What I am trying to do&lt;BR /&gt;&lt;/STRONG&gt;I have a list of URLs in my DB, and I need to use the API to generate a preview&amp;nbsp;and embed it in a webpage&lt;BR /&gt;&lt;BR /&gt;for the original preview links, I am parsing the lnk to extract the path and then use the&amp;nbsp;get_preview endpoint&lt;BR /&gt;for the shared link, I am thinking about calling&amp;nbsp;&lt;SPAN&gt;get_shared_link_metadata and from there get the id and call&amp;nbsp;get_preview&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;&lt;EM&gt;Is there an easier way to do this?&lt;/EM&gt;&lt;/U&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:13:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinguish-shared-link-and-preview-links/m-p/272638#M16187</guid>
      <dc:creator>Mhd</dc:creator>
      <dc:date>2019-05-29T09:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Distinguish shared link and preview links</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinguish-shared-link-and-preview-links/m-p/272660#M16197</link>
      <description>Dropbox shared links for files do currently have /s/, but there are other kinds of links. E.g., shared links for folders use /sh/. &lt;BR /&gt;&lt;BR /&gt;In any case though, these link formats are not guaranteed and are subject to change in the future, so you shouldn't rely on them. &lt;BR /&gt;&lt;BR /&gt;Likewise, you shouldn't rely on the "&lt;A href="http://www.dropbox.com/home/path/to/file?preview" target="_blank"&gt;www.dropbox.com/home/path/to/file?preview&lt;/A&gt;" format.&lt;BR /&gt;&lt;BR /&gt;You can list the files/folders in your account directly though, using list_folder and list_folder continue. That will return file metadata including path and id. &lt;BR /&gt;&lt;BR /&gt;Using the paths you get from those, you can call the other methods as necessary, e.g., get_preview to get preview data, create_shared_link_with_settings to create shared links, list_shared_links to retrieve existing shared links, etc.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Apr 2018 16:26:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinguish-shared-link-and-preview-links/m-p/272660#M16197</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-04-16T16:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Distinguish shared link and preview links</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinguish-shared-link-and-preview-links/m-p/272750#M16201</link>
      <description>&lt;P&gt;Hello Greg,&lt;BR /&gt;&lt;BR /&gt;Thanks for the detailed answer.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried to go with with list_folder and&amp;nbsp;&lt;SPAN&gt;list_&lt;/SPAN&gt;&lt;SPAN&gt;folder/continue. But&amp;nbsp;t&lt;/SPAN&gt;here are thousnads of files and it was not practical.&lt;BR /&gt;Also, sometimes a user have a sharing link but the file is not shared with their dropbox account, they only have the public sharing link, so I can't use this option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;It would be great if there was a way to get the meta data of a file&amp;nbsp;through a link , despite what kind of link it is.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For now, I will relay on&amp;nbsp;&lt;SPAN&gt;get_shared_link_metadata and if it failesI will assume it is a preview link and parse it accorrdingly.&lt;BR /&gt;and I will limit URLs I have to sharing links only from now on.&lt;BR /&gt;&lt;BR /&gt;Thanks again for your answer, please let me know if there is an easier approach&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 08:47:33 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinguish-shared-link-and-preview-links/m-p/272750#M16201</guid>
      <dc:creator>Mhd</dc:creator>
      <dc:date>2018-04-17T08:47:33Z</dc:date>
    </item>
  </channel>
</rss>

