Zapier · sdk · fg-0377

Zapier integration never refreshes the OAuth token because the API returns 403 or 400 on expiry

If you see Zaps fail with the API's token expired message until the user reconnects, the cause and the fix for Zapier are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Zaps fail with the API's token expired message until the user reconnectsautoRefresh is on but refreshAccessToken never runsOnly APIs that answer 401 refresh correctly
Cause
With autoRefresh, platform core throws RefreshAuthError only for a 401 response. Any other status for an expired token is treated as an ordinary error.
Fix
Detect the API's expiry response in afterResponse and throw z.errors.RefreshAuthError yourself.
Apply
const refreshOnExpiry = (response, z) => { if (response.status === 403 && /expired/i.test(response.content)) { throw new z.errors.RefreshAuthError(); } return response; }; module.exports = { afterResponse: [refreshOnExpiry] };
Affected
zapier-platform-core with OAuth2 autoRefresh or session auth, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun