OAuth2 Refresh Token Only Works For An Hour In Google Integration

Document created by sheng_liao462475 Employee on May 5, 2017Last modified by Adam Arrowsmith on May 19, 2017
Version 3Show Document
  • View in full screen mode

Issue

When using HTTP Client connector for use with Google API via OAuth2, the access token does not refresh after a period of time. The process only works for an hour and then fails with error "401 Invalid Credentials" or error "Unable to set HTTP OAuth2 Authorization on connection. Failed updating OAuth Token".

 

Solution

  1. Make sure to use the following Access Token URL and Authorization Token URL.
    1. Authorization Token URL: https://accounts.google.com/o/oauth2/v2/auth
    2. Access Token URL: https://www.googleapis.com/oauth2/v4/token
  2. Remove 'approval_prompt = force' from Authorization Parameter.
  3. Add 'prompt = consent' to Authorization Parameter.
  4. Regenerate token.
  5. Remove 'prompt = consent' from Authorization Parameter.
  6. Add 'approval_prompt = force' to Authorization Parameter.
  7. Save and redeploy the process.

Attachments

    Outcomes