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
Probe9
4 years agoExplorer | Level 3
Dropbox .NET SDK - DropboxClient usage
Hi all,
I'm working with Dropbox .Net v2 api from nuget (6.22.0) in a Windows Desktop application (.net core 3.1).
I successfully integrate the OAuth2 flow as recommends in documentation:
A client-side Desktop app or mobile app that requires background access: Use the OAuth code flow with PKCE, with refresh tokens.
With given information I'm able to create the DropboxClient class:
Documentations defines that the DropboxClient automatically refresh the access_token, but that happens on any type of API calls?
As example, when I perform a client.Files.DownloadAsync, before actually do it, is the access_token refreshed if expired?
What is the recommends usage of the client; create, perform a request then dispose, or; should it be a single instance and stay alive for the entire app life time?
Thanks in advance.
Ciao
The client will automatically perform the refresh process for you whenever needed, on any such call, so you do not need to dispose of your existing client.
- Greg-DBDropbox Staff
The client will automatically perform the refresh process for you whenever needed, on any such call, so you do not need to dispose of your existing client.
About Discuss Dropbox Developer & API
Make connections with other developers797 PostsLatest Activity: 7 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!