Http://stackoverflow.com/questions/10827920/google-oauth-refresh-token-is-not-being-received
The is only provided on the first authorization from the refresh_token user. Subsequent authorizations, such as the kind you make and testing an OAuth2 integration, would not return the refresh_token again. :)
- Go to your account security settings:https://www.google.com/settings/u/1/security.
- Click the Edit button next to "Authorizing applications and sites".
- Then click the "Revoke Access" next to your app.
- The next OAuth2 request you to make would return a
refresh_token .
Alternatively, you can add the "query parameter to the approval_prompt=force " OAuth redirect (see Google's OAuth 2.0 for Web Server applicat Ions page).
This would prompt the user to authorize the application again and would always return a refresh_token .
Google API, the problem of NULL refresh token