Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
deebee_it
7 years agoHelpful | Level 5
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/Ard...
- 5 years ago
FOUND!
I used static IP:162.125.5.7to access the server.
Probably Drobbox changed the IP a few days ago.
Now I switched to
api.dropboxapi.comand everything works like a charm.Thank you for the support! :)
Greg-DB
Dropbox Community Moderator
7 years agoThe /2/files/list_folder endpoint is an "RPC"-style endpoint, meaning it expects the parameters in the request body (not in a request header).
Please move your parameters to the request body instead of the "Dropbox-API-Arg" header and try again. (The "Dropbox-API-Arg" header is only used for content-upload and content-download -style endpoints.)
deebee_it
5 years agoHelpful | Level 5
Good morning.
I go right with this call for about 1 year:
request = String("POST /2/files/list_folder HTTP/1.1") + "\r\n"
+ "Host: api.dropboxapi.com" + "\r\n"
+ "User-Agent: ESP8266/Arduino_blabla"\r\n"
+ "Authorization: Bearer MYTOKENxxxxx\r\n"
+ "Accept: */*" + "\r\n"
+ "Content-Type: application/json; charset=utf-8" + "\r\n"
+ "Content-Length: " + request_data.length() + "\r\n\r\n"
+ request_data
;With this request_data:
request_data = "{\"path\":\"" + MYPATH+ "\"}";Now, days ago I started getting this error:Error (4xx)We can't find the page you're looking for.
So, probably some logic is changed serverside...
May you please tell me what do I need to change in my API call?
Thank you.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!