Refresh Token with Google API Java Client Library

view story

http://stackoverflow.com – I'm using the Google API Java Client http://code.google.com/p/google-api-java-client/ and am able to get the access token successfully for Android. // Google Accounts credential = GoogleAccountCredential.usingOAuth2(this, CalendarScopes.CALENDAR); SharedPreferences settings = getPreferences(Context.MODE_PRIVATE); credential.setSelectedAccountName(settings.getString(PREF_ACCOUNT_NAME, null)); As I'd like my web server to make offline API calls, I need a refresh token. I have been searching extensively and have not yet figured out how to do so. Ideally, I'd prefer to use the Google API J (HowTos)