Box Java SDK OAuth 2.0 Authentication
I have gone through the OAuth 2.0 steps to get an authorization code and sent that back with my client ID, secret, and redirect URL to get an access token and refresh token. I used those to create a BoxAPIConnection. Now I am confused on how I can programmatically keep my tokens fresh and not have to keep going through the process of authenticating through OAuth 2.0. From the other posts on this online forum, I see that access tokens only last 1 hour and you have to use a refresh token within its 60 day valid period. My question is how do I receive a new access token and refresh token? Am I sending a new POST request to a specific URL in order to receive a new set of access and refresh tokens? Can someone explain this to me?
-
Hey ,
Thanks for your message! Check out the issues tab on the Github page - there are a few good threads where developers have had similar conversations (and solutions!) that should help you out. Here's one that I see:
https://github.com/box/box-java-sdk/issues/241
And you can always search the entire issue history here:
https://github.com/box/box-java-sdk/issues
Hope that helps!
Thanks,
Jason
Please sign in to leave a comment.
Comments
1 comment