You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Ivan_
3 years agoHelpful | Level 6
Resfresh Token using c# code for Oauth2.0
Hi,
I need assisstance in Oauth2.0 usage.
After I generated token I have following properties
The moment that I do not understand is how to refresh token. Here I got ExpiredAt property t...
Ivan_
Helpful | Level 6
Hi Здравко
Thank you for the quick response
Can you suggest how properly construct client object with refresh token ?
Currently I transfer only access token and it works
Здравко
3 years agoLegendary | Level 20
Ivan_ wrote:...
Currently I transfer only access token and it works
🤓 Really?! If it works, what actually you are asking for?! 🧐😁
You cannot expect when object is initialized with just access token it be able refresh somehow. 🤷 How such thing can happen? Impossible of course - the refresh token is required, at least! Even more, once refresh token is provided, the access token and expiration date become optional. Take a look here for instance. 😉 Depending on how exactly you have performed authentication flow (PKCE or not), you may need to add the application secret too.
Hope this helps.
- Ivan_3 years agoHelpful | Level 6
Thanks
So, basically I need to this, am I right ?
var config = new DropboxClientConfig("SimplePKCEOAuthApp") { HttpClient = httpClient
};
var client = new DropboxClient(Settings.Default.RefreshToken, ApiKey, config);
I have performed authentication flow without PKCE.
I need to clarify 2 moments :
1) What is that parameter for config object : "SimplePKCEOAuthApp"?
Is that application console name ?
2)Is it enough to transfer only refresh token ? It looks strange, because we do not use access token with such approach
That is the way how I get access token
It is same way how I described it in that topic https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/td-p/626621 with which you helped me
- Здравко3 years agoLegendary | Level 20
Ivan_ wrote:...
var client = new DropboxClient(Settings.Default.RefreshToken, ApiKey, config);
I have performed authentication flow without PKCE.
...
Nope, skipping application secret is only possible while PKCE is in use.
Ivan_ wrote:...
1) What is that parameter for config object : "SimplePKCEOAuthApp"?
Is that application console name ?
...
No, it's just a free name (even non mandatory - i.e. you can skip it) describing somehow your application. You can put there "ARTY1", for instance, it normally match the application name. Follow this rule.
Ivan_ wrote:...
2)Is it enough to transfer only refresh token ? It looks strange, because we do not use access token with such approach
...
You are mixing different things! In previous discussion the topic was the code, not the token! (take care, in your code you are still mixing the names - might be that's why you got in confusion) Access token is enough by self to authenticate regular API call (or equivalent using any SDK), refrsh token on other side needs additional confirmations (least application' key, but in your case application' secret too) to be validated the usage.
- Ivan_3 years agoHelpful | Level 6
ЗдравкоI am sorry for being not clear in my questions as you said the following : "You are mixing different things! In previous discussion the topic was the code, not the token! (take care, in your code you are still mixing the names - might be that's why you got in confusion)"
currently I successfully get token and the code.
Now I need to clarify this moment about refreshing the token. As you told in first reply, DropBox does everything without me. So, for uploading files, how I need to constrct the client object in authentication flow without PKCE ?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,918 PostsLatest Activity: 2 days ago
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 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!