<?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: Bad request (400) if made in my server in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-request-400-if-made-in-my-server/m-p/250752#M14430</link>
    <description>That error message indicates that the Dropbox API couldn't parse the contents of the request body as JSON to read the parameters. Sending an empty request body is one way to cause that.&lt;BR /&gt;&lt;BR /&gt;Can you elaborate on the environment you're using to run this on your server? If you can share the steps to reproduce the issue, I'll be happy to take a look.&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Nov 2017 15:56:20 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-11-02T15:56:20Z</dc:date>
    <item>
      <title>Bad request (400) if made in my server</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-request-400-if-made-in-my-server/m-p/250640#M14425</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I am barely starting with the dropbox api v2 to make requests to my dropbox account. However, i have a problem with all requests made in my server. I can make functioning requests on JSFiddle by normal ajax http request or with dbx javascript used on the offical documents, this is the example: &lt;A href="http://jsfiddle.net/3nfz9fc4/" target="_blank"&gt;http://jsfiddle.net/3nfz9fc4/&lt;/A&gt;&amp;nbsp;You can check the object outcomes in console log.&lt;/P&gt;&lt;P&gt;Nevertheless, using the SAME CODE (having specified by the same way the access token and headers if needed), if i try to make ANY request on my server or localhost i get the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{status: 400, error: "Error in call to API function "files/list_folder": request body: could not decode input as JSON", response: c}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;inside response object, somewhere below the rainbow:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="name"&gt;error&lt;/SPAN&gt;&lt;SPAN class="object-properties-section-separator"&gt;:&lt;/SPAN&gt;&lt;SPAN class="object-value-error value"&gt;&lt;SPAN class="object-value-error"&gt;Error: cannot POST &lt;A href="https://api.dropboxapi.com/2/files/list_folder" target="_blank"&gt;https://api.dropboxapi.com/2/files/list_folder&lt;/A&gt; (400)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing on my mind i got is that is like it could not detect anything written on the body of the request, and therefore it cant detect the {"path":""} JSON, but i am not even sure about it.&lt;/P&gt;&lt;P&gt;Why do the requests both with ajax and dbx work in JSFiddle page but not in my server, localhost, or chrome console (with script src linked)?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:17:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-request-400-if-made-in-my-server/m-p/250640#M14425</guid>
      <dc:creator>Asanchez8</dc:creator>
      <dc:date>2019-05-29T09:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Bad request (400) if made in my server</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-request-400-if-made-in-my-server/m-p/250752#M14430</link>
      <description>That error message indicates that the Dropbox API couldn't parse the contents of the request body as JSON to read the parameters. Sending an empty request body is one way to cause that.&lt;BR /&gt;&lt;BR /&gt;Can you elaborate on the environment you're using to run this on your server? If you can share the steps to reproduce the issue, I'll be happy to take a look.&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Nov 2017 15:56:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-request-400-if-made-in-my-server/m-p/250752#M14430</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-11-02T15:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Bad request (400) if made in my server</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-request-400-if-made-in-my-server/m-p/250759#M14431</link>
      <description>&lt;P&gt;Never mind. It turns out it was a "necessary" and old script linked which was modifying ajax requests, not made by me. Horrible.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 18:05:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-request-400-if-made-in-my-server/m-p/250759#M14431</guid>
      <dc:creator>Asanchez8</dc:creator>
      <dc:date>2017-11-02T18:05:01Z</dc:date>
    </item>
  </channel>
</rss>

