<?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: Error in call to API function &amp;quot;files/list_folder&amp;quot;: request body: could not decode inpu in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-files-list-folder-quot/m-p/447521#M23311</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, thanks for the advice. the second suggestion works:&lt;/P&gt;&lt;PRE&gt;ArrayResize(body,ArraySize(body)-1);&lt;/PRE&gt;&lt;P&gt;thank you again.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Aug 2020 23:50:31 GMT</pubDate>
    <dc:creator>autratec</dc:creator>
    <dc:date>2020-08-22T23:50:31Z</dc:date>
    <item>
      <title>Error in call to API function "files/list_folder": request body: could not decode input as JSON</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-files-list-folder-quot/m-p/447412#M23307</link>
      <description>&lt;P&gt;Looks like this question being raised before. i did try postman and able to pass the API message to box api and return sucessfully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i am integrate MT4/MQL4 language with Dropbox. The code is like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int res;&lt;BR /&gt;string signal,out_header,in_header,URL,in_signal;&lt;BR /&gt;char body[],result[];&lt;BR /&gt;&lt;BR /&gt;URL = "&lt;A href="https://api.dropboxapi.com/2/files/list_folder" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/2/files/list_folder&lt;/A&gt;";&lt;BR /&gt;out_header = "Authorization: Bearer ,&amp;lt;token&amp;gt;\r\nContent-Type: application/json";&lt;BR /&gt;signal = "{\"path\": \"/Home\"}" ;&lt;/P&gt;
&lt;P&gt;StringToCharArray (signal,body,0,-1,CP_ACP);&lt;BR /&gt;res = WebRequest("POST",URL,out_header,0,body,result,in_header);&lt;BR /&gt;in_signal = CharArrayToString(result,0,-1,CP_ACP);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do include "{\"path\": \"/Home\"}" in the body and tried couple times and still facing the error: Error in call to API function "files/list_folder": request body: could not decode input as JSON&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Plesae suggest what might be wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thx.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 05:24:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-files-list-folder-quot/m-p/447412#M23307</guid>
      <dc:creator>autratec</dc:creator>
      <dc:date>2020-08-24T05:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error in call to API function "files/list_folder": request body: could not decode inpu</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-files-list-folder-quot/m-p/447440#M23308</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1341735"&gt;@autratec&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The only secure way to investigate what's going on would be take a look on the raw http stream and see what's the problem there. As far as I can see, there are 2 possible trouble points. In 'out_header' you miss the trailing separator, so header block and the request body could stick together. Add '\r\n' at the end! Next, your 'body' contains not only the actual body, but the string termination symbol at the end, also. I'm not sure, but the server could get confused because of. Strip it using something like:&lt;/P&gt;&lt;PRE&gt;ArrayResize(body,ArraySize(body)-1);&lt;/PRE&gt;&lt;P&gt;just before call to WebRequest.&lt;/P&gt;&lt;P&gt;Hope this gives the right direction.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Aug 2020 14:47:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-files-list-folder-quot/m-p/447440#M23308</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2020-08-22T14:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error in call to API function "files/list_folder": request body: could not decode inpu</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-files-list-folder-quot/m-p/447521#M23311</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, thanks for the advice. the second suggestion works:&lt;/P&gt;&lt;PRE&gt;ArrayResize(body,ArraySize(body)-1);&lt;/PRE&gt;&lt;P&gt;thank you again.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Aug 2020 23:50:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-files-list-folder-quot/m-p/447521#M23311</guid>
      <dc:creator>autratec</dc:creator>
      <dc:date>2020-08-22T23:50:31Z</dc:date>
    </item>
  </channel>
</rss>

