cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know more about how you can find anything and protect everything? Check it out here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re-Issuing Invalid Tokens Problem

Re-Issuing Invalid Tokens Problem

Sunsing
New member | Level 2

I have a server hosting an API in asp.net (dotnetnuke DNN), where Dropbox is an integral part of the workflow within it and it works in the background. The problem exists in the ever changing tokens. I'm met with a barrage of expired_tokens when it's working as a scheduled event in the background, transferring files and validating integrity of the data. I have tried to figure out how to use Refresh Tokens, to no avail. 

With this website, there is only a single Dropbox account. It acts as a storage bin. Users don't get their own access, it comes from me. However, I am hoping to find an answer so I can re-issue the tokens while doing background processes before the token expires. I have tried

Dim refreshToken = dbx.RefreshAccessToken(Nothing)

and I get response that it cannot be refreshed. I really want to be able to have a token that will not expire. Or a refreshToken process that returns a new token and works.

It's quite frustrating to have to constantly check, as one minute of downtime is catastrophic.

 

1 Reply 1

Greg-DB
Dropbox Staff

You can find a working example of getting and using a refresh token to maintain long-term access with the .NET SDK here:

 

https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OauthBasic/Progr...

 

That example shows how you can explicitly call RefreshAccessToken, but that's actually not required. As long as you supply the required credentials as shown there, the SDK itself will automatically perform the refresh in the background for you whenever needed.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?