Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Jagan Tirumalai
1 year agoExplorer | Level 4
Dropbox generate Auth Token thru java
Hi,
I am able to generate Access Token manually thru the dropbox website which is working fine. But expires after a few hours, Is there any method in Java that can generate access token program...
Jagan Tirumalai
1 year agoExplorer | Level 4
Hi,
Thank you for your suggestion. The class PkceAuthorize.java doesn't generate or return any access_token. How do i go about using this class?
All i need is access_token to be generated without manual intervention, so that i can automate the dropbox . Is there such a method in java dropbox api?
DB-Des
Dropbox Community Moderator
1 year agoHi Jagan Tirumalai,
You would need to use getter methods to retrieve the values of the respective properties. Following the example provided previously (for PKCE flow), it is returning a DbxAuthFinish object. That object contains getters for the properties that could be returned in the response — one of them being the access_token.
In this specific case, the corresponding getter method to retrieve the access token would be getAccessToken().
The following lines of code provide an example of one way the access_token could be retrieved:
// Assign the DbxAuthFinish object to a variable
DbxAuthFinish authFinish = authorize();
// Use the getAccessToken() method to retrieve the access_token and save to a variable
String accessToken = authFinish.getAccessToken();
To retrieve the refresh_token, for offline access, you would use the getRefreshToken() method.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!