You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

pineapps's avatar
pineapps
Helpful | Level 5
7 years ago

OAuth2 access token request - Basic authentication not working

I am trying to integrate Dropbox in my webservice. However I decided to use a direct integration instead of any APIs as I need a limited number of functions only and not used to code object orientate...
  • Greg-DB's avatar
    Greg-DB
    7 years ago

    Thanks! The API is indicating that the request wasn't valid. This particular error message isn't too specific, but it seems to be indicating that the necessary information wasn't given.

     

    Looking through your code, you appear to be sending the parameters as JSON. The /oauth2/token endpoint expects application/x-www-form-urlencoded POST parameters though (with the app key and secret in particular optionally sent in the Authorization header instead).

     

    Please update your code to send the rest of the parameters as application/x-www-form-urlencoded POST parameters instead.