Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Omri1984
4 years agoExplorer | Level 4
2 console application 1 account -
if i have a user the authenticate in one application get access refresh tokens.
then authenticate in another application is the old token will stop working
or every authentication can exist no matter what.
i am asking this because my company toll doing a migration many for each user ,
if during the migration the user will authenticate again in order to run another migration does the old token will expire and i need to use the new token also for the old migration ?
is my explanation clear ?
Refresh tokens do not expire automatically, but they can be revoked by the app or user on demand. That means by default you do not need to get a new refresh token for an account that is already connected (unless it is explicitly revoked by the app or user).
Short-lived access tokens do expire after four hours. A refresh token is used to perform the "refresh", which is a way to get a new short-lived access token. The Dropbox .NET SDK will do that for your automatically so you don't need to implement that yourself.
10 Replies
Replies have been turned off for this discussion
- Greg-DB4 years ago
Dropbox Community Moderator
Authorizing a new application does not affect existing app authorizations. If you get a refresh token for a particular app on an account, existing refresh tokens for other apps on that same account will not be affected. Accounts can have multiple apps connected at the same time.
- Omri19844 years agoExplorer | Level 4
and if it the same app ?
- Greg-DB4 years ago
Dropbox Community Moderator
The same applies if it's the same app. A single app-account pair can have multiple different refresh tokens. Creating a new refresh token for an app on an account does not affect existing refresh tokens for that app on that account.
- Omri19844 years agoExplorer | Level 4
is there a limit on the an=mount of token pair for user ?
- Greg-DB4 years ago
Dropbox Community Moderator
No, there's no particular limit on that.
- Omri19844 years agoExplorer | Level 4
and if i am using the .net SDk do i need to call the refresh token or it's refresh automatically ,
if it refresh automatically ?
why do i need the refresh token ?
and what will happened to the other pairs?
- Greg-DB4 years ago
Dropbox Community Moderator
If you use the official Dropbox API v2 .NET SDK in C#, you do not need to perform the refresh yourself. The SDK will perform the refresh automatically for you as long as you supply the credentials (the refresh token, etc.). You can find an example of getting and supplying a refresh token in the OauthBasic example (non-PKCE, meant for server-side apps) as well as in the OAuthPKCE example (PKCE, meant for client-side apps).
The refresh token is used to retrieve new short-lived access tokens whenever needed, so that no individual access token is valid for a long period of time, while the app can still maintain long-term access.
Using a refresh token to perform the refresh process of getting a new short-lived access token does not affect other existing refresh tokens.
- Omri19844 years agoExplorer | Level 4
ok.
so i need to refresh only the access token every 4 hours
but not need to get a new refresh token
did i understand correctly?
very confusing.
you are telling me that i do not need to refresh the token that the .net sdk is doing it for me
but i do need to refresh the access token
did i understand correctly?
- Greg-DB4 years ago
Dropbox Community Moderator
Refresh tokens do not expire automatically, but they can be revoked by the app or user on demand. That means by default you do not need to get a new refresh token for an account that is already connected (unless it is explicitly revoked by the app or user).
Short-lived access tokens do expire after four hours. A refresh token is used to perform the "refresh", which is a way to get a new short-lived access token. The Dropbox .NET SDK will do that for your automatically so you don't need to implement that yourself.
- Omri19844 years agoExplorer | Level 4
understood thanks
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!