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
AndyLei
3 years agoExplorer | Level 4
Help with generating access tokens in Node.js
I am new to using https in Node.js, and Dropbox API, and am not familiar with the syntax. I have had no success finding Javascript examples on how to get an access token from a refresh token, and am ...
Greg-DB
3 years agoDropbox Staff
I recommend using the official Dropbox JavaScript SDK if possible, as it will do much of the work for you. Alternatively, it may also just serve as a good example even if you can't use it.
Otherwise, refer to the documentation for /oauth2/token. It contains examples of calling the endpoint for different scenarios that you can translate to your platform.
For example, the error you posted here is indicating that the call failed because it's missing the required parameter "grant_type". I see you're attempting to set that, but you're trying to do so as JSON; this endpoints takes these parameters as application/x-www-form-urlencoded POST parameters, not JSON.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,917 PostsLatest Activity: 11 days ago
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 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!