Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Unable to upload the files using API , see the Poster screenshot for paramaters and Body. Any help would be really appreciated.
Seeing below error :
Error in call to API function "files/upload": Bad HTTP "Content-Type" header: "multipart/form-data; boundary=--------------------------098587943575938712484518". Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack".
The Dropbox API /upload endpoint does require that the HTTPS request use one of the Content-Type values listed in the error message you shared.
I see that you are attempting to set a valid Content-Type value, but the actual request is using a different value ("multipart..."). It seems that the HTTPS client you're using is overriding the value you're attempting to set.
You should refer to the documentation for the client you're using to determine how to disable that behavior. For instance, you likely will want to use the "binary" option seen in the screenshot of the "Body" tab you shared.
Also, note that some of your other headers look incorrect as well. The Dropbox API parameters should be sent as JSON in a single "Dropbox-API-Arg" header, not in separate "mode", "autorename", etc. headers like you have. You can find more information and an example in the documentation.
The Dropbox API /upload endpoint does require that the HTTPS request use one of the Content-Type values listed in the error message you shared.
I see that you are attempting to set a valid Content-Type value, but the actual request is using a different value ("multipart..."). It seems that the HTTPS client you're using is overriding the value you're attempting to set.
You should refer to the documentation for the client you're using to determine how to disable that behavior. For instance, you likely will want to use the "binary" option seen in the screenshot of the "Body" tab you shared.
Also, note that some of your other headers look incorrect as well. The Dropbox API parameters should be sent as JSON in a single "Dropbox-API-Arg" header, not in separate "mode", "autorename", etc. headers like you have. You can find more information and an example in the documentation.
after following the suggestions you mentioned, It works great. Now trying out retrieve features of the files.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
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!