We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
someoneknew
5 years agoNew member | Level 2
Re: Bad request (400) if made in my server
Hey! I am getting the same error when I try to get token through "https://api.dropboxapi.com/oauth2/token". It works in postman but when I try to access this route with header and request body with m...
kylea
Dropbox Staff
5 years ago[Cross-linking for reference: https://stackoverflow.com/questions/66144019/dropbox-400-error-while-trying-to-get-token-auth ]
The Dropbox API will return a more specific error message in the response body; print the full response body to see the cause.
Typically, an HTTP status 400 suggests that the body of the request is malformed - but the more specific message will help diagnose this.
- someoneknew5 years agoNew member | Level 2
Here is the full error:
- Greg-DB5 years ago
Dropbox Community Moderator
someoneknew Thanks for the additional information. This screenshot doesn't seem to show the actual response body from the Dropbox API though. The "400" is just the status code of the response from the Dropbox API, but the response would also contain a body, which isn't being shown here. You may need to check the documentation for the client you're using to see how you can print out the response body as well.
(In any case, it looks like you're sending the parameters as JSON, but the parameters for /oauth2/token should be sent as application/x-www-form-urlencoded POST parameters, not JSON.)
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!