Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have an app that uses long-lived access tokens to upload files in the background. In order to migrate to using refresh tokens, I upgraded from .Net SDK 4.9.* to .Net SDK 6.*. The first call our app makes is to Files.GetMetadataAsync to determine if the file exists. I noticed that if the call results in an AuthException (invalid_access_token), the latency of the call is now 10-20 seconds, whereas before the upgrade this was under 1 second. I tried upgrading first to 6.0.1, and then to 6.2. Same result. There were 0 code changes with this upgrade; just an update of the Nuget package. I have rolled back this upgrade until the problem is better understood. I am using .Net core 3.1. Any ideas why?
I think I can answer my own question. We create the DropboxClient without specifying MaxRetriesOnError. In 6.*, this defaults to 4. If I set this to 0, then my code responds with latency values on par with the behavior in 4.9 SDK. So, I suspect the 6.* SDK is retrying on AuthException, whereas the 4.9 SDK did not. If it is retrying on AuthExceptions, this seems like a bug to me, especially if its an "invalid access token", as it is in my case. The token isn't suddenly going to change and become valid on a retry.
Thanks! It looks like your understanding is correct. I'm bringing this up with the team to see if we can update the SDK to not retry on an auth failure like that.
Hi there!
If you need more help you can view your support options (expected response time for a 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!