We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Probe9
3 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 developers
795 PostsLatest Activity: 6 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!