Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here!
Forum Discussion
w3Abhishek
2 years agoExplorer | Level 4
Dropbox OAuth2 Endpoint not giving refresh Token
Hey Dropbox Team,
I am using the Dropbox OAuth2 API for my personal project. But after receiving the authorization code from the user through OAuth URL.
I used it to get the access_token and refresh_token but upon sending the authorization code, the API is only sending access_token which get expired and not refresh token.
Now, how I will be able to refresh the access_token after expiration?
Help me.
w3Abhishek Здравко is correct; you'll need to set token_access_type=offline on the authorization URL in order to receive a refresh token from /oauth2/token. Refer to the following resources for more information:
3 Replies
- Здравко2 years agoLegendary | Level 20
Hi w3Abhishek,
If nothing set explicit as token access type, it's as assumed to be online access type! You need offline access type for refresh token. If you have forgotten set this parameter, just set it on OAuth2 initiation. 😉 Take a look here for possible flow. Note the parameter token_access_type.
Hope this helps.
- Greg-DB2 years ago
Dropbox Community Moderator
w3Abhishek Здравко is correct; you'll need to set token_access_type=offline on the authorization URL in order to receive a refresh token from /oauth2/token. Refer to the following resources for more information:
- w3Abhishek2 years agoExplorer | Level 4
Thanks Greg-DB and Здравко. Adding token_access_type=offline in my OAuth URL solved the problem.
About Discuss Dropbox Developer & API
Make connections with other developers815 PostsLatest Activity: 2 days ago
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 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!