Not refreshing access token automatically
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
Solution: Not refreshing access token automatically
Is there a preferred workaround until this is fixed?
Trust Score
3 verifications
- 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
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep