Where can I find a java exemple for offline access to google API?
My background java process needs to download data from Analytics.
I found this tutorial:
https://developers.google.com/analytics/resources/tutorials/hello-analytics-api#create_service_object
It works but does not explain how to perform an offline_ ccess.
In HelloAnalyticsApiSample the user uses the browser to retrieve all the tokens.
…but when access token expires, how can I instantiate the “Credential” java object with a refreshed access token without the use of the browser?
This case is not present in this tutorial.
Does an offline access example using java library exist?
Take a look at https://developers.google.com/accounts/docs/OAuth2WebServer#offline to see how you can obtain offline access and use Refresh Tokens.