Skip to content

Not refreshing access token automatically #2350

Closed
@calculuschild

Description

@calculuschild

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
  });

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.needs more infoThis issue needs more information from the customer to proceed.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions