Need to see if your shared folder is taking up space on your dropbox đšâđ»? Find out how to check here.
Forum Discussion
umairali
8 years agoNew member | Level 2
Error in call to API function "auth/token/from_oauth1": Bad HTTP "Content-Type" header: "application
i am calling app auth api but i am receiving below error. Error in call to API function "auth/token/from_oauth1": Bad HTTP "Content-Type" header: "application/json; boundary=---------------------...
Greg-DB
Dropbox Community Moderator
8 years ago[Cross-linking for reference: https://stackoverflow.com/questions/50795358/error-in-call-to-api-function-auth-token-from-oauth1-bad-http-content-type ]
The error message is indicating that your client is sending up an unexpected Content-Type value (using a boundary), when it needs to be using one of the listed expected values.
This appears to be happening because you're just sending the POST fields directly. You need to sending JSON though, so you would put your CURLOPT_POSTFIELDS array inside json_encode().
Also, note that this endpoint is only meant for use if you already have pre-existing OAuth 1 access tokens. If you don't have pre-existing OAuth 1 access tokens, you should send the user through the normal OAuth 2 app authorization flow. You can find information on how that works in the OAuth guide here:
https://www.dropbox.com/developers/reference/oauth-guide
The documentation for the OAuth 2 app authorization flow can be found here:
https://www.dropbox.com/developers/documentation/http/documentation#authorization
About 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!