Reputation: 4033
How to get new google's access token using refresh token programatically using the google java token.
Upvotes: 1
Views: 1810
Reputation: 4033
I have found out the following code, and it's the working solution for getting the new access token, and there might be some other alternative for same :-TokenResponse response = new GoogleRefreshTokenRequest(httpTransport, jsonFactory, token, clientId, clientSecret).execute();
in the code response could be used to generate various google services again and here token is the response token.
Upvotes: 2