<?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 API method to download file within shared folder, no token required in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-method-to-download-file-within-shared-folder-no-token/m-p/427727#M1276</link>
    <description>&lt;P&gt;Hello Dropbox team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been reading through the HTTP API documentation trying for figure out how to do the following, without success. Given a folder foo that has been publicly shared, I want to programatically download a file within it, let's say foo/bar/baz.txt Here is an example folder&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/sh/p0fa8tl8zzmetuv/AABKUyvlxZGIOvxPWPoothbra?dl=0" target="_blank" rel="noopener"&gt;https://www.dropbox.com/sh/p0fa8tl8zzmetuv/AABKUyvlxZGIOvxPWPoothbra?dl=0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The id of that foo folder is&amp;nbsp;id:kLMXpr_BUfIAAAAAAAQJqg so in order to download foo/bar/baz.txt with a token you can clearly do this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;$ curl -X POST https://content.dropboxapi.com/2/files/download -H  "Authorization: Bearer $TOKEN" -H "Content-Type: text/plain" -H 'Dropbox-API-Arg: {"path": "id:kLMXpr_BUfIAAAAAAAQJqg/bar/baz.txt"}'
hello world&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;But that requires a token, and the folder is public so no token should really be needed. I see the&amp;nbsp;/2/sharing/get_shared_link_file endpoint too, but it also requires a token. I also see that you can download&amp;nbsp; &lt;A href="https://www.dropbox.com/sh/p0fa8tl8zzmetuv/AABd6WxiqSLVgQkrNzSP2B54a/bar/baz.txt?raw=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/sh/p0fa8tl8zzmetuv/AABd6WxiqSLVgQkrNzSP2B54a/bar/baz.txt?raw=1&lt;/A&gt; directly but there is no way (that I see) to programatically know that AABd6WxiqSLVgQkrNzSP2B54a segment given just the url of the foo folder or the id of the foo folder.&lt;BR /&gt;&lt;BR /&gt;Is there any way to programatically download foo/bar/baz.txt without a token? Let me know if you need more details.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2020 18:27:07 GMT</pubDate>
    <dc:creator>mgbelisle</dc:creator>
    <dc:date>2020-06-08T18:27:07Z</dc:date>
    <item>
      <title>API method to download file within shared folder, no token required</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-method-to-download-file-within-shared-folder-no-token/m-p/427727#M1276</link>
      <description>&lt;P&gt;Hello Dropbox team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been reading through the HTTP API documentation trying for figure out how to do the following, without success. Given a folder foo that has been publicly shared, I want to programatically download a file within it, let's say foo/bar/baz.txt Here is an example folder&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/sh/p0fa8tl8zzmetuv/AABKUyvlxZGIOvxPWPoothbra?dl=0" target="_blank" rel="noopener"&gt;https://www.dropbox.com/sh/p0fa8tl8zzmetuv/AABKUyvlxZGIOvxPWPoothbra?dl=0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The id of that foo folder is&amp;nbsp;id:kLMXpr_BUfIAAAAAAAQJqg so in order to download foo/bar/baz.txt with a token you can clearly do this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;$ curl -X POST https://content.dropboxapi.com/2/files/download -H  "Authorization: Bearer $TOKEN" -H "Content-Type: text/plain" -H 'Dropbox-API-Arg: {"path": "id:kLMXpr_BUfIAAAAAAAQJqg/bar/baz.txt"}'
hello world&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;But that requires a token, and the folder is public so no token should really be needed. I see the&amp;nbsp;/2/sharing/get_shared_link_file endpoint too, but it also requires a token. I also see that you can download&amp;nbsp; &lt;A href="https://www.dropbox.com/sh/p0fa8tl8zzmetuv/AABd6WxiqSLVgQkrNzSP2B54a/bar/baz.txt?raw=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/sh/p0fa8tl8zzmetuv/AABd6WxiqSLVgQkrNzSP2B54a/bar/baz.txt?raw=1&lt;/A&gt; directly but there is no way (that I see) to programatically know that AABd6WxiqSLVgQkrNzSP2B54a segment given just the url of the foo folder or the id of the foo folder.&lt;BR /&gt;&lt;BR /&gt;Is there any way to programatically download foo/bar/baz.txt without a token? Let me know if you need more details.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 18:27:07 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-method-to-download-file-within-shared-folder-no-token/m-p/427727#M1276</guid>
      <dc:creator>mgbelisle</dc:creator>
      <dc:date>2020-06-08T18:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: API method to download file within shared folder, no token required</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-method-to-download-file-within-shared-folder-no-token/m-p/427749#M1277</link>
      <description>&lt;P&gt;Unfortunately, there isn't a good solution for this use case. Those endpoints are the right ways to download using a file path/ID or shared link, respectively, but as you found both of those only support "user authentication", so an access token is necessary. I'll pass this along as a feature request for support for calling without an access token,&amp;nbsp;but I can't promise if or when that might be implemented.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another option would be to download from the shared link itself using the parameters&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.dropbox.com/files-folders/share/force-download" target="_self" rel="noopener noreferrer"&gt;documented here&lt;/A&gt; like you said, but that doesn't offer a way to specify and get only a particular file from the linked folder, as you found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 18:49:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-method-to-download-file-within-shared-folder-no-token/m-p/427749#M1277</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-06-08T18:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: API method to download file within shared folder, no token required</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-method-to-download-file-within-shared-folder-no-token/m-p/427783#M1281</link>
      <description>&lt;P&gt;Roger that, thanks for the info Greg. I'll probably just throw a low scoped burner token for a throwaway account hard coded into my app and hope no one decompiles it to abuse it. Hopefully it won't hit those rate limits because the nature of my files is that they can be cached forever thankfully.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that feature is ever added just let me know and I'll consume it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 20:18:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-method-to-download-file-within-shared-folder-no-token/m-p/427783#M1281</guid>
      <dc:creator>mgbelisle</dc:creator>
      <dc:date>2020-06-08T20:18:19Z</dc:date>
    </item>
  </channel>
</rss>

