Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
belt_basya
2 years agoExplorer | Level 3
Trouble Obtaining Refresh Token Alongside Access Token from Dropbox OAuth2 in Local Environment
I'm trying to integrate Dropbox into my web application using OAuth2. My code seems to be working correctly, but I'm only receiving the access token and not the refresh token upon successful login. I...
Greg-DB
Dropbox Community Moderator
2 years ago[Cross-linking for reference: https://stackoverflow.com/questions/78479669/trouble-obtaining-refresh-token-alongside-access-token-from-dropbox-oauth2-in-lo ]
Whether or not you use a redirect URI, as well as where/how the redirect URI is hosted, doesn't affect whether or not a refresh token is returned.
In order to get a refresh token from Dropbox, you need to set token_access_type=offline on /oauth2/authorize. I don't see that in your code, so you'll need to check on whether your OAuth library automatically does that for you, and if not, how you can set it.
W can't offer support for the DropboxOAuth2Strategy class as that's not written by Dropbox. I suggest referring to the documentation for it.
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!