cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Discuss Dropbox Developer & API

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

Re: Dropbox .NET SDK (Refresh Token)

Dropbox .NET SDK (Refresh Token)

GevorgMel
Helpful | Level 5
Go to solution

Hi,

I found changes in OAuth2 for API, so the authorization could be done with offline access, ascuirung both Access and Refresh tokens. This part is OK, with ProcessCodeFlow method in SDK. But could not find any method to refresh access token using saved refresh token.

 

Can you please help me with this case?

 

Thanks,

 

 

Capture.PNG

 

22 Replies 22

jon p
New member | Level 2
Go to solution

I can't find any example of how to let the SDK take care of the token refreshing? I need to do this independently of user input.

 

Do I have to hit this method:

public DropboxClient(
	string oauth2RefreshToken,
	string appKey,
	string appSecret,
	DropboxClientConfig config
)

 

Do I use the same refresh token every time?

 

Greg-DB
Dropbox Staff
Go to solution

@jon p Yes, using that method will let the SDK take care of this for you automatically in the background. And yes, you should use the same refresh token for a given user. The refresh token can and should be used repeatedly. It does not expire on its own (though it can be revoked by the user or app).

jon p
New member | Level 2
Go to solution

Thanks for the reply, I'll try it out.

Need more support?