Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
bffy_smmmers
5 years agoHelpful | Level 5
dbx.auth not working / getAccessTokenFromCode giving 400 response?
I'm trying to access the `getAccessTokenFromCode` method and I keep receiving a 400 error. On top of that, I can't seem to write the code and get it to work in the way it's written in the Auth ex...
- 5 years ago
I'm not sure I follow your message, but you should specify it in both places. The /oauth2/authorize page redirect_uri parameter specifies where to send the user after they authorize the app, and the 'redirectUri' you pass to 'getAccessTokenFromCode' is just a string sent up in a /oauth2/token API call to verify that it matches.
Greg-DB
Dropbox Community Moderator
5 years agoThat's correct, that parameter isn't currently implemented in the Dropbox JavaScript SDK, but I'll be sure to pass this along as a feature request. You can add it to the /oauth2/authorize URL in your app's own code though, by modifying the URL returned by getAuthenticationUrl.
bffy_smmmers
5 years agoHelpful | Level 5
Greg-DB Would you be able to expand on how that exactly gets done? Thanks!
- Greg-DB5 years ago
Dropbox Community Moderator
For example, where authUrl is the URL you got from getAuthenticationUrl, you can modify it like this:
var url = new URL(authUrl); var urlParams = new URLSearchParams(url.search); urlParams.set('force_reapprove', 'true'); url.search = urlParams; console.log(url.href);
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!