You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
CTO1
3 years agoExplorer | Level 3
Using Refresh Token
Currently I am trying to migrate our application to the new refresh token system
I am getting my Refresh token and my ExpiresAt values, and saving that data on the database,
if the ExpiresAt ...
Greg-DB
Dropbox Staff
Building a DropboxClient with the refresh token, app key, and app secret as you've shown here is correct and valid. Are you sure that is the specific DropboxClient object you're using when you're getting that 'expired_access_token' error? I just tried it and it is working for me with my own values.
Note that an 'ExpiresAt' value would be referring to a specific access token (not a refresh token). When building a client with the refresh token and app key/secret like that, the client won't even have an access token anyway, so it will automatically get a new valid one. That being the case, you don't actually need to store and supply the access token and expiration information to begin with, since you can always just supply the refresh token.
CTO1
3 years agoExplorer | Level 3
Greg-DB wrote:Building a DropboxClient with the refresh token, app key, and app secret as you've shown here is correct and valid. Are you sure that is the specific DropboxClient object you're using when you're getting that 'expired_access_token' error? I just tried it and it is working for me with my own values.
Note that an 'ExpiresAt' value would be referring to a specific access token (not a refresh token). When building a client with the refresh token and app key/secret like that, the client won't even have an access token anyway, so it will automatically get a new valid one. That being the case, you don't actually need to store and supply the access token and expiration information to begin with, since you can always just supply the refresh token.
Thanks Greg for replaying my question
we are using a third party tool in our UI to navigate our dropbox folders and we send our AuthToken.
we don't need it for the dropbox client but is there a way to get the new AuthToken after we use RefreshToken?
Thanks in advance
- Greg-DB3 years agoDropbox Staff
No, the official Dropbox .NET SDK does not offer a way to retrieve the latest short-lived access token that it has, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
- Здравко3 years agoLegendary | Level 20
Easy workaround can be a parallel instantiation of DropboxRequestHandler class. Big part of the stuff inside, not closely related to refreshing, can be wipe out. Classes, fields and methods visibility should be changed, so be accessible outside. Using RefreshAccessToken method (already public) new/actual refresh token will be received. The received token can be accessed through OAuth2AccessToken within the options field. That's it - just a copy of existing file (and filtered) from SDK to the application. 😉
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 2 days agoIf 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!