One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
Koichia
5 years agoExplorer | Level 4
Can I get current access token from DropboxClient (.NET SDK)?
Hello,
I'm currently in the process of migrating to the short-lived access token now, and I have one question regarding access token.
Looking at the documentation, Dropbox.Api.DropboxClient will automatically refresh the access token if necessary.
My question: Can I access to the current (whether it's refreshed or not) access token and it's expiration through Dropbox.Api.DropboxClient (or somewhere else)?
I want to get the latest access token whenever possible because our end-user can access Dropbox resources in quick succession from their Web browser, and when they do, we make requests to their Dropbox resources from our .NET server.
Without the current access token available to us, the Dropbox.Api.DropboxClient will end up obtaining a new access token for almost every single request we make to Dropbox, which is not ideal for us (extra overhead, and we might get rate limitted too), and probably for Dropbox too.
Please let me know if it's possible for me to access the current access token (you don't have to tell me whether it's refreshed or not, since I can tell that by comparing with the old access token I have), and it's expiration from your .NET SDK.
Thanks!
- Greg-DB
Dropbox Staff
Thanks for writing this up and sharing the context. Unfortunately, no, I don't believe the Dropbox .NET SDK offers a way to retrieve the current short-lived access token like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
- KoichiaExplorer | Level 4
Thanks for your reply! Yes I understand you cannot promiss if or when, but since there's still time left until the long-lived access token is retired, I'll patiently wait with a hope for this feature in the near future :) Otherwise we'll probably make a separate call to the token endpoint on our own and get new access token manually.
- kailasbholeNew member | Level 2
Is this functionality still not implemented
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!