<?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: Powershell-Download not working api v2 in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170223#M6359</link>
    <description>&lt;P&gt;That's just the status. Check the body of the response for more information.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:31:54 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-06-16T00:31:54Z</dc:date>
    <item>
      <title>Powershell-Download not working api v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170220#M6356</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to download with powershell a file from the dropbox.But I always get a 400 error.&lt;/P&gt;
&lt;P&gt;$arg = '{"path": "/'+$SourceFilePath+'.txt"}'&lt;BR /&gt; $authorization = "Bearer &amp;lt;access token&amp;gt;"&lt;/P&gt;
&lt;P&gt;$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"&lt;BR /&gt; $headers.Add("Authorization", $authorization)&lt;BR /&gt; $headers.Add("Dropbox-API-Arg", $arg)&lt;BR /&gt; &lt;BR /&gt; Invoke-RestMethod -Uri &lt;A href="https://content.dropboxapi.com/2/files/download" rel="nofollow noreferrer" target="_blank"&gt;https://content.dropboxapi.com/2/files/download&lt;/A&gt; -Method Post -Headers $headers -OutFile $SourceFilePath&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My upload script works perfectly:&lt;/P&gt;
&lt;P&gt;$arg = '{"path": "/'+$DestinationFilePath+'.txt","mode": "overwrite", "autorename": false, "mute": false }'&lt;BR /&gt; $authorization = "Bearer &amp;lt;access token&amp;gt;"&lt;/P&gt;
&lt;P&gt;$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"&lt;BR /&gt; $headers.Add("Authorization", $authorization)&lt;BR /&gt; $headers.Add("Dropbox-API-Arg", $arg)&lt;BR /&gt; $headers.Add("Content-Type", 'application/octet-stream')&lt;/P&gt;
&lt;P&gt;Invoke-RestMethod -Uri &lt;A href="https://api-content.dropbox.com/2/files/upload" rel="nofollow noreferrer" target="_blank"&gt;https://api-content.dropbox.com/2/files/upload&lt;/A&gt; -Method Post -InFile $SourceFilePath -Headers $headers&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone tell me what's wrong with the download part?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:32:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170220#M6356</guid>
      <dc:creator>chip -.</dc:creator>
      <dc:date>2019-05-29T09:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell-Download not working api v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170221#M6357</link>
      <description>&lt;P&gt;What does the body of the 400 response show? It should be an error indicating the issue.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:57:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170221#M6357</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-06-15T23:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell-Download not working api v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170222#M6358</link>
      <description>&lt;P&gt;In the body are: "Bad Request".&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:30:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170222#M6358</guid>
      <dc:creator>chip -.</dc:creator>
      <dc:date>2016-06-16T00:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell-Download not working api v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170223#M6359</link>
      <description>&lt;P&gt;That's just the status. Check the body of the response for more information.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:31:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170223#M6359</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-06-16T00:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell-Download not working api v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170224#M6360</link>
      <description>&lt;P&gt;Ok the body say: "Error in call to API function "files/download": You provided a non-empty HTTP "Content-Type" header ("application/x-www-form-urlencoded"). This API function requires that the header be missing or empty."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if I extend the header ($headers.Add("Content-Type", 'application/x-www-form-urlencoded')) as is still the exact same error.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:54:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170224#M6360</guid>
      <dc:creator>chip -.</dc:creator>
      <dc:date>2016-06-16T00:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell-Download not working api v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170225#M6361</link>
      <description>&lt;P&gt;The message says that the API call expects a missing or empty Content-Type, and that you provided&amp;nbsp;'application/x-www-form-urlencoded', not that you should provide it.&lt;/P&gt;
&lt;P&gt;You should instead make sure you don't send a&amp;nbsp;Content-Type header at all, or if you do, make sure it's empty.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:03:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170225#M6361</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-06-16T01:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell-Download not working api v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170226#M6362</link>
      <description>&lt;P&gt;I haven't tried it myself, but it &lt;A href="https://technet.microsoft.com/en-us/library/hh849971.aspx" target="_blank" rel="nofollow noreferrer"&gt;looks like&lt;/A&gt;&amp;nbsp;you may need to use&amp;nbsp;-ContentType ''.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:14:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170226#M6362</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-06-16T01:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell-Download not working api v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170227#M6363</link>
      <description>&lt;P&gt;Thank you Gregory, this fix my problem.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 13:44:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Powershell-Download-not-working-api-v2/m-p/170227#M6363</guid>
      <dc:creator>chip -.</dc:creator>
      <dc:date>2016-06-16T13:44:06Z</dc:date>
    </item>
  </channel>
</rss>

