Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

deebee_it's avatar
deebee_it
Helpful | Level 5
7 years ago
Solved

Error in call to API function "files/list_folder": request body: could not decode input as JSON

Good morning,
I do this request with Arduino:

  client.print(String("POST /2/files/list_folder HTTP/1.1\r\n") +
               "Host: api.dropboxapi.com" +
               "User-Agent: ESP8266/Arduino_YAGI\r\n" +
               "Authorization: Bearer " + (String)my_token +"\r\n" +
               "Accept: */*"+
               "Content-Type: application/json" +
               "Content-Length: 33" + "\r\n" + "\r\n" +
               "Dropbox-API-Arg: {\"path\":\"/glucose/201901/09/15/\"}"
               ); 

so, the arg is:

               Dropbox-API-Arg: {"path":"/glucose/201901/09/15/"}

The 'client' variable is:

               WiFiClientSecure client;

where 'WiFiClientSecure' is a package of the library to do secure calls.

But I receive this error:

HTTP/1.1 400 Bad Request
Server: nginx
Date: Thu, 10 Jan 2019 09:53:23 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Content-Security-Policy: sandbox; frame-ancestors 'none'
X-Dropbox-Request-Id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Content-Disposition: attachment; filename='error'

5f
Error in call to API function "files/list_folder": request body: could not decode input as JSON

Any idea to resolve this error? 

Thank you very much in advance!

  • FOUND!
    I used static IP:

    162.125.5.7 

    to access the server.

     

    Probably Drobbox changed the IP a few days ago.

    Now I switched to 

    api.dropboxapi.com
    and everything works like a charm.
     
    Thank you for the support! :)

11 Replies

Replies have been turned off for this discussion
  • deebee_it's avatar
    deebee_it
    Helpful | Level 5
    6 years ago

    FOUND!
    I used static IP:

    162.125.5.7 

    to access the server.

     

    Probably Drobbox changed the IP a few days ago.

    Now I switched to 

    api.dropboxapi.com
    and everything works like a charm.
     
    Thank you for the support! :)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!