<?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 DropboxResponseError: Response failed with a 400 code in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DropboxResponseError-Response-failed-with-a-400-code/m-p/572556#M26726</link>
    <description>&lt;P&gt;I was testing my (on replit) website that uses dropbox for downloads. The website works fine, but when I click the download button, nothing downloads and this appears in the logs:&lt;BR /&gt;(BTW this is bash)&lt;BR /&gt;&lt;BR /&gt;DropboxResponseError: Response failed with a 400 code&lt;BR /&gt;at /home/runner/Chocolate-Syrup-picker/src/node_modules/dropbox/cjs/src/response.js:34:11&lt;BR /&gt;at processTicksAndRejections (internal/process/task_queues.js:95:5) {&lt;BR /&gt;status: 400,&lt;BR /&gt;headers: Headers {&lt;BR /&gt;[Symbol(map)]: [Object: null prototype] {&lt;BR /&gt;'cache-control': [Array],&lt;BR /&gt;'content-security-policy': [Array],&lt;BR /&gt;'x-content-type-options': [Array],&lt;BR /&gt;'content-type': [Array],&lt;BR /&gt;'accept-encoding': [Array],&lt;BR /&gt;date: [Array],&lt;BR /&gt;server: [Array],&lt;BR /&gt;'content-length': [Array],&lt;BR /&gt;'strict-transport-security': [Array],&lt;BR /&gt;'x-robots-tag': [Array],&lt;BR /&gt;'x-dropbox-response-origin': [Array],&lt;BR /&gt;'x-dropbox-request-id': [Array],&lt;BR /&gt;connection: [Array]&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;error: 'Error in call to API function "files/upload": The given OAuth 2 access token is malformed.'&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jan 2022 22:05:53 GMT</pubDate>
    <dc:creator>StormDragon_64</dc:creator>
    <dc:date>2022-01-22T22:05:53Z</dc:date>
    <item>
      <title>DropboxResponseError: Response failed with a 400 code</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DropboxResponseError-Response-failed-with-a-400-code/m-p/572556#M26726</link>
      <description>&lt;P&gt;I was testing my (on replit) website that uses dropbox for downloads. The website works fine, but when I click the download button, nothing downloads and this appears in the logs:&lt;BR /&gt;(BTW this is bash)&lt;BR /&gt;&lt;BR /&gt;DropboxResponseError: Response failed with a 400 code&lt;BR /&gt;at /home/runner/Chocolate-Syrup-picker/src/node_modules/dropbox/cjs/src/response.js:34:11&lt;BR /&gt;at processTicksAndRejections (internal/process/task_queues.js:95:5) {&lt;BR /&gt;status: 400,&lt;BR /&gt;headers: Headers {&lt;BR /&gt;[Symbol(map)]: [Object: null prototype] {&lt;BR /&gt;'cache-control': [Array],&lt;BR /&gt;'content-security-policy': [Array],&lt;BR /&gt;'x-content-type-options': [Array],&lt;BR /&gt;'content-type': [Array],&lt;BR /&gt;'accept-encoding': [Array],&lt;BR /&gt;date: [Array],&lt;BR /&gt;server: [Array],&lt;BR /&gt;'content-length': [Array],&lt;BR /&gt;'strict-transport-security': [Array],&lt;BR /&gt;'x-robots-tag': [Array],&lt;BR /&gt;'x-dropbox-response-origin': [Array],&lt;BR /&gt;'x-dropbox-request-id': [Array],&lt;BR /&gt;connection: [Array]&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;error: 'Error in call to API function "files/upload": The given OAuth 2 access token is malformed.'&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 22:05:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DropboxResponseError-Response-failed-with-a-400-code/m-p/572556#M26726</guid>
      <dc:creator>StormDragon_64</dc:creator>
      <dc:date>2022-01-22T22:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: DropboxResponseError: Response failed with a 400 code</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DropboxResponseError-Response-failed-with-a-400-code/m-p/572921#M26734</link>
      <description>&lt;P&gt;I see that you're getting the error "The given OAuth 2 access token is malformed". This error message should indicate that the access token being provided by the client (generally supplied as a "Bearer" value in the "Authorization" header of the HTTPS request sent by the third party app) is not of a valid Dropbox access token format. When sending the access token, the app needs to send the entire and exact access token unmodified, as it was originally supplied by Dropbox.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that Dropbox currently has two types of access tokens: long-lived and short-lived. Long-lived access tokens should be 64 characters long total, while short-lived access tokens start with "sl." and will have more than 64 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not aware of any issues that should currently be causing this error to be returned incorrectly. I also just tried both types of access tokens and they are working correctly for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check that your app has a full valid access token string loaded, and that it is sending the access token without modifying it. For instance, make sure that there are not stray characters or whitespace added to the access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, with the Dropbox JavaScript SDK, you supply the access token in the &lt;A href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#Dropbox__anchor" target="_self"&gt;the 'Dropbox' constructor&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 16:41:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DropboxResponseError-Response-failed-with-a-400-code/m-p/572921#M26734</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-01-24T16:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: DropboxResponseError: Response failed with a 400 code</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DropboxResponseError-Response-failed-with-a-400-code/m-p/573066#M26740</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StormDragon_64_0-1643065783142 redacted.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/27269iA80359CBE20A5C9C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StormDragon_64_0-1643065783142 redacted.png" alt="StormDragon_64_0-1643065783142 redacted.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Does that look good? Also should I be storing the file in the src folder or somewhere else?&lt;BR /&gt;(Also the capital A's were there when dropbox gave me the new token, I think I was just lucky)&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 03:52:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DropboxResponseError-Response-failed-with-a-400-code/m-p/573066#M26740</guid>
      <dc:creator>StormDragon_64</dc:creator>
      <dc:date>2022-01-25T03:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: DropboxResponseError: Response failed with a 400 code</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DropboxResponseError-Response-failed-with-a-400-code/m-p/573252#M26747</link>
      <description>&lt;P&gt;That looks like a valid long-lived access token. Can you double check that this is the exact string being used? Can you share the rest of the relevant code where this is used for reference?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, note that access tokens enable access to Dropbox accounts, so for the sake of security, you should never share access tokens like this. I've redacted it from your post, but since this access token has been shared here, you should disable this access token. You can do so by revoking access to the app entirely, if the access token is for your account, here:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/account/connected_apps" target="_blank"&gt;https://www.dropbox.com/account/connected_apps&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Or, you can disable just this access token using the API:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Note that doing so will cause any further API calls made using this access token to fail. This cannot be undone, and you would need to get a new access token to replace this one.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 16:17:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DropboxResponseError-Response-failed-with-a-400-code/m-p/573252#M26747</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-01-25T16:17:35Z</dc:date>
    </item>
  </channel>
</rss>

