Google Workspace APIs · sdk · fg-0025
googleapis JWT client built with positional arguments is silently unauthenticated
401 or 403 on every call from a service account
Verified 2026-07-05 · Confirmed by 0 builders · Trust 50/100
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'] })Affects: googleapis for Node v173 and later, July 2026
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp