Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
heisenberg41
5 years agoNew member | Level 2
Bad HTTP "Content-Type" header
Hello,
I am writing a simple app that creates some folders when we add a new client to our systems.
I keep getting an error:
Error in call to API function "files/create_folder_batch": Bad HTTP ...
Greg-DB
Dropbox Community Moderator
5 years agoIt looks like you're just passing along a native object as the API call parameters, and curl is then applying the multi-part Content-Type. You should send up the parameters as JSON.
You can build your parameters as JSON like:
$params = json_encode(array(
'paths'=> $folders,
'autorename'=> false,
'force_async'=> false));heisenberg41
5 years agoNew member | Level 2
Thank you Greg! That worked.
Biggest noob question of all. How did you know it had to be JSON encoded?
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!