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
Fomka_Wyverno
12 months agoNew member | Level 2
Get Access Token JavaScript in fetch
const parameters = {
'code': params.code,
'grant_type': 'authorization_code',
'redirect_uri': window.location.origin,
...
- 12 months ago
It looks like you're sending the parameters as JSON, but the /oauth2/token endpoint expects them as application/x-www-form-urlencoded POST parameters, and so your parameters aren't getting read. Update your implementation to send application/x-www-form-urlencoded POST parameters instead.
Fomka_Wyverno
New member | Level 2
The request parameters do not match any of the supported authorization flows. Please refer to the API documentation for the correct parameters.
but I don't understand why if I used all the parameters from the documentation. At the same time, if you do it in сURL, everything will work out well
Greg-DB
12 months agoDropbox Staff
It looks like you're sending the parameters as JSON, but the /oauth2/token endpoint expects them as application/x-www-form-urlencoded POST parameters, and so your parameters aren't getting read. Update your implementation to send application/x-www-form-urlencoded POST parameters instead.
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 24 hours agoIf 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 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!