Closed
Description
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?
oAuth2Client.setCredentials({
access_token: googleAccessToken,
refresh_token: googleRefreshToken
});