Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
emretezisci
3 years agoExplorer | Level 3
"error_description": "missing required field \"grant_type\""
I am trying to get a sl access token with my refresh token but it gives this error. Any idea why? Input: {
"body": {
"grant_type": "",
"refresh_token": "<token>"
},
"contentType": "applicat...
Здравко
3 years agoLegendary | Level 20
In addition why are you using application/json encoding? It requires application/x-www-form-urlencoded POST parameters. 😉
emretezisci
3 years agoExplorer | Level 3
Thanks, for your prompt responses. I am making these requests from another integration that doesn't support application/x-www-form-urlencoded.
Do you know any other way to make it work with an application/json encoding?
- Здравко3 years agoLegendary | Level 20
To be honest, I haven't tried (haven't need), but you may do it by "hands". Shouldn't be so difficult to join names and value using = and & (no additional encoding steps needed in particular - all value are URL compatible already). Right? 🙂
- Greg-DB3 years ago
Dropbox Community Moderator
emretezisci The /oauth2/token endpoint does not support those parameters being passed as "application/json"; they'll need to be passed as "application/x-www-form-urlencoded".
While it is recommended to use some library or platform functionality to have that built automatically, as Здравко said you can otherwise try to build that directly.
- emretezisci3 years agoExplorer | Level 3
Is there any other server-side authentication option that doesn't require "application/x-www-form-urlencoded"?
- Greg-DB3 years ago
Dropbox Community Moderator
emretezisci There isn't another endpoint for using a refresh token to get a new short-lived access token.
If your platform doesn't natively provide support for writing the data as "application/x-www-form-urlencoded", I suggest checking your platform's documentation to see how you can supply a string instead so you can build the parameters in your own code, and also override the "Content-Type" header with "application/x-www-form-urlencoded".
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!