- Symptom
- 401 or 403 on every call from a service accountNo error when constructing the client
- Cause
- Newer googleapis versions expect the JWT constructor to take a single options object. Positional arguments are accepted without error but produce a client with no credentials.
- Fix
- Pass an options object.
- Apply
new google.auth.JWT({ email: sa.client_email, key: sa.private_key, scopes: ['https://www.googleapis.com/auth/spreadsheets'] })- Affected
- googleapis for Node v173 and later, July 2026
Last verified 2026-07-05 · Confirmed by 1 builder