Acccess /Refresh Token Google OAuth2 not valid

PROBLEM:-

Bad request - please check your parameters
invalid_token

SOLUTION:-

EDIT YOUR QAUTH CLIENT:-

  • GO TO credentials—→QAuth 2.0 Client IDs
  • copy your Client ID and Client secret
  • in n8n, open your google QAuth2 or generic QAuth credentials.

ADD THIS TO THE “AUTH URL” IN N8N:-

  • example https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent

RECONNECT YOUR CREDENTIALS:-

  • Delete the old n8n Google OAuth credentials.
  • Recreate them fresh with the modified Auth URL.
  • Click Connect / Sign in with Google again.
  • Approve the scopes → you’ll now get a refresh token

VERIFY INSIDE N8N:-

  • Open the credential after saving → click “View” → you’ll see a new refresh_token in JSON.
  • Now you’re safe — even after the access token expires, n8n will automatically refresh it.

HOPE IT WILL GIVE YOU A BEST IDIA !!!