The refresh_token is only provided on the first authorization from the user. Subsequent authorizations, such as the kind you make while testing an OAuth2 integration, will not return the refresh_token again.
Go to your account security settings:
https://security.google.com/settings/security/permissions?pli=1.
Then click "Revoke Access" next to your app.
The next OAuth2 request you make will return a refresh_token.
You need "access_type=offline" & "approval_prompt=force" in all cases when you want the refresh_token.
Go to your account security settings:
https://security.google.com/settings/security/permissions?pli=1.
Then click "Revoke Access" next to your app.
The next OAuth2 request you make will return a refresh_token.
You need "access_type=offline" & "approval_prompt=force" in all cases when you want the refresh_token.
No comments:
Post a Comment