Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.
Forum Discussion
epris
5 years agoExplorer | Level 4
Refreshing short live tokens without Consumer Key and Consumer Secrect
Dear all,
we are updating our code in order to support refresh token. We need backgroud renewal of the token.
We are using the JAVA version of the API.
It seems that in order to update the token (to refresh the short lived token) it is mandatory to store in the code the following secret information (Consumer Key and Consumer Secrect):
ApiKey and ApiSecret
DbxRequestConfig requests ApiKey and ApiSecret in order to refresh the token.
https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/oauth/DbxCredential.html
Is there another solution that avoids to write the Consumer Key and Consumer Secrect within the code?
Thanks to all
Yes, you can use the "PKCE" flow to process "offline" access without having the app secret. You can find an example of running this with the Java SDK here:
2 Replies
- Greg-DB5 years ago
Dropbox Community Moderator
Yes, you can use the "PKCE" flow to process "offline" access without having the app secret. You can find an example of running this with the Java SDK here:
- epris5 years agoExplorer | Level 4
We solved following your suggestion, thanks!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,039 PostsLatest Activity: 12 hours ago
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 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!