One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
eisoft
3 years agoNew member | Level 2
i can't get the refresh_token
my aceess token has expired 😞
and i can't get the refresh_token
I'm trying to backup to dropbox using access token via curl on linux. However, the access token automatically expires after about 5 hours, and renewal access codes cannot be issued.
I checked using the code below. But still refresh_token is not visible.
curl https://api.dropbox.com/oauth2/token \ -d code=<AUTHORIZATION_CODE> \ -d grant_type=authorization_code \ -d redirect_uri=<REDIRECT_URI> \ -u <APP_KEY>:<APP_SECRET>
This is the code result. refresh_token could not be found.
{"access_token": "MYACCESSCODE", "token_type": "bearer", "expires_in": 14400, "scope": "account_info.read files.content.read files.content.write files.metadata.read files.metadata.write sharing.read sharing.write", "uid": "MYIUIDCODE", "account_id": "dbid:MYDBID"}
how can i get the refresh_token?
- Greg-DB
Dropbox Staff
In order to get a refresh token, you need to request "offline" access when starting the app authorization flow, which you can do by setting 'token_access_type=offline' on /oauth2/authorize.
You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.
About Discuss Dropbox Developer & API
Make connections with other developers804 PostsLatest Activity: 4 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!