FG
๐Ÿ’ป Software๐Ÿ”Œ APIs & SDKsGoogle

Not refreshing access token automatically

Freshabout 5 years ago
Mar 14, 20260 views
Confidence Score75%
75%

Problem

Environment details - OS: Windows 10 64x - Node.js version: 12.16.3 - npm version: 6.14.4 - `googleapis` version: 59.0.0 Steps to reproduce I expect the API to automatically refresh the access token on the next API call after it expires, but I only get an "Invalid Client" error. I can successfully access the API and upload/download google drive files until the access token expires, so I know the tokens I received from the API on first signin are valid. I have that same refresh token assigned to the oauth2client immediately before any request. I can verify that they are set via console.log. Is there some missing step to get the API to "automatically refresh the access token" as it says in the documentation? [code block]

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: Not refreshing access token automatically

Low Risk

Is there a preferred workaround until this is fixed?

74

Trust Score

3 verifications

100% success
  1. 1

    Is there a preferred workaround until this is fixed?

    Is there a preferred workaround until this is fixed?

Validation

Resolved in googleapis/google-api-nodejs-client GitHub issue #2350. Community reactions: 4 upvotes.

Verification Summary

Worked: 3
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

google-apioauthsdktype:-bugneeds-more-infopriority:-p2:rotating_light: