<?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: How to dowload a shared file by its id? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-dowload-a-shared-file-by-its-id/m-p/406287#M22095</link>
    <description>&lt;P&gt;Cool, Thanks a lot, Greg.&lt;/P&gt;&lt;P&gt;Have a wonderful day.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2020 16:32:49 GMT</pubDate>
    <dc:creator>Pearman</dc:creator>
    <dc:date>2020-04-02T16:32:49Z</dc:date>
    <item>
      <title>How to dowload a shared file by its id?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-dowload-a-shared-file-by-its-id/m-p/406135#M22083</link>
      <description>&lt;P&gt;I'm trying to make a simple web app that will list contents on one particular shared folder. There is about 200 small excel files in that folder and the app would like to download those files and do some magic on them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to list all files with:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dbx.filesListFolder({
&amp;nbsp; path: "/some path",
&amp;nbsp; include_media_info: true,
&amp;nbsp; shared_link: {
&amp;nbsp; &amp;nbsp; url:&amp;nbsp;"https://www.dropbox.com/sh/id_or_whatever/another_random_string?dl=0"
&amp;nbsp; }
})&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I would like to download all the files and do something with them.&lt;BR /&gt;I tried `filesDownloadZip` but it rejected path in form of "id:asdfasdf" where asdfasddf is a string I got from parent_shared_folder_id&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;`filesDownload` throws the same error. Other posts on this forum mentioned `sharingGetSharedLinkFile` but that requires some kind of preview link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 09:20:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-dowload-a-shared-file-by-its-id/m-p/406135#M22083</guid>
      <dc:creator>Pearman</dc:creator>
      <dc:date>2020-04-02T09:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to dowload a shared file by its id?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-dowload-a-shared-file-by-its-id/m-p/406225#M22090</link>
      <description>&lt;P&gt;You can use&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesDownloadZip__anchor" target="_self"&gt;filesDownloadZip&lt;/A&gt; (for an entire folder) or &lt;A href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesDownload__anchor" target="_self"&gt;filesDownload&lt;/A&gt; (for a specific file) if the file/folder is in the account that you're connected to (i.e., for the access token you're using). In that case, the 'id' should just be the 'id' property returned in the relevant&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-js/global.html#FilesFileMetadata" target="_self"&gt;FilesFileMetadata&lt;/A&gt; or&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-js/global.html#FilesFolderMetadata" target="_self"&gt;FilesFolderMetadata&lt;/A&gt; object you got from&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesListFolder__anchor" target="_self"&gt;filesListFolder&lt;/A&gt;. You should not try to construct that value yourself. (The 'parent_shared_folder_id' is a different kind of ID.) Likewise, if the folder is in the connected account, you can list the contents using&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesListFolder__anchor" target="_self"&gt;filesListFolder&lt;/A&gt;/&lt;A href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesListFolderContinue__anchor" target="_self"&gt;filesListFolderContinue&lt;/A&gt; without passing in the shared link, by instead just using the relevant path in the account.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the content is not in the connected account though, you will need to instead use&amp;nbsp;&lt;A href="http://sharingGetSharedLinkFile" target="_self"&gt;sharingGetSharedLinkFile&lt;/A&gt; instead, like you mentioned. You do need to pass in the 'url' and 'path' in that case, but the 'url' in that case is the same "&lt;A href="https://www.dropbox.com/sh/" target="_blank"&gt;https://www.dropbox.com/sh/&lt;/A&gt;..." you used originally.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 13:34:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-dowload-a-shared-file-by-its-id/m-p/406225#M22090</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-04-02T13:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to dowload a shared file by its id?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-dowload-a-shared-file-by-its-id/m-p/406287#M22095</link>
      <description>&lt;P&gt;Cool, Thanks a lot, Greg.&lt;/P&gt;&lt;P&gt;Have a wonderful day.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 16:32:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-dowload-a-shared-file-by-its-id/m-p/406287#M22095</guid>
      <dc:creator>Pearman</dc:creator>
      <dc:date>2020-04-02T16:32:49Z</dc:date>
    </item>
  </channel>
</rss>

