One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
priyalcoc1
2 years agoExplorer | Level 3
Dropbox Access Token Auto Generation
I was trying to upload my files to dropbox using api, but the thing is my token expires after few minutes.
Is there any way that while uploading, it checks whether the token is expired or not, and them automatically generates fresh token, because updating the token manually is a mess if you know, as my product is going to be a public product so this might be an issue.
- ЗдравкоLegendary | Level 20
Yes, that's what the refresh token purpose.
- Greg-DB
Dropbox Staff
priyalcoc1 Здравко is correct; you would request "offline" access to get and use a refresh token for this. Please refer to the following resources for more information:
- priyalcoc1Explorer | Level 3
Tried this, but the thing is when I try to generate new token, it takes me to a website, and I can't access that website without email and password, so I can't share my id and pass to public na.
- Greg-DB
Dropbox Staff
If your app needs to maintain long-term access without the user manually re-authorizing it repeatedly, the app should request "offline" access so that it gets a refresh token. The refresh token doesn't expire and can be stored and used repeatedly to get new short-lived access tokens whenever needed, without the user manually reauthorizing the app. Once the app has a refresh token, it can use it to perform the refresh process entirely automatically, without the user present and without their username and password, to get a new short-lived access token whenever needed.
Please refer to the resources in my previous message for information on how to use this functionality.
About Discuss Dropbox Developer & API
Make connections with other developers806 PostsLatest Activity: 10 hours 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!