- 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