[Feature Request] Add HTTP 403 support for OAuth2 token refresh in generic OAuth2Api credential

Hello n8n community! :waving_hand:

I’m experiencing an issue with Inoreader API OAuth2 integration that reveals a gap in n8n’s current OAuth2 handling.

Problem:

Inoreader API returns HTTP 403 (instead of the standard 401) when OAuth2 tokens expire. Currently, n8n’s generic oAuth2Api credential only triggers automatic token refresh on HTTP 401 errors, causing workflows to fail permanently when Inoreader tokens expire.

Error message:

403 - “AppId required! Contact app developer. See https://inoreader.dev

Current behavior:

  • n8n detects HTTP 401 → triggers automatic token refresh :white_check_mark:
  • n8n receives HTTP 403 → treats as permanent error :cross_mark:

Proposed solution:

Add tokenExpiredStatusCode: 403 support for the generic oAuth2Api credential type in GenericFunctions.js, similar to existing configurations for:
• goToWebinarOAuth2Api: { tokenExpiredStatusCode: 403 }
• microsoftAzureMonitorOAuth2Api: { tokenExpiredStatusCode: 403 }

Expected configuration:

oAuth2Api: {
    tokenExpiredStatusCode: 403,
},

This would enable automatic token refresh for APIs like Inoreader that use HTTP 403 for expired tokens.

Workaround:

Workaround:
Currently using a scheduled workflow to manually refresh tokens every 12 hours.

Would this enhancement be possible? This would benefit any API that uses HTTP 403 for token expiration with generic OAuth2 credentials.

Best regards

I would like to join with the same problem, but with the Avito service. I have already created an Issue on GitHub and received a response that this update is in the plans. However, the Issue was closed without clear indications and implementation time as unplanned. You could support my topic with the same problem.

1 Like

Currently using a scheduled workflow to manually refresh tokens every 12 hours.

Hi, I have been trying to figure this out and cannot. Would you mind sharing that workflow?

Actually nevermind and as an FYI to you and sundry, the latest version of the n8n node (1.0.5) does this automagically

Hi, what do you mean by “the latest version of n8n node” ? Something changed in the Credentials part ?

Hi, what do you mean by “the latest version of n8n node” ? Something changed in the Credentials part ?

Hi, I mean this one, it’s a community node and the latest package is 1.0.5 https://www.npmjs.com/package/n8n-nodes-inoreader

Actually it’s still having an issue but I think they’re working on it; at least they have been attempting to address the issue :blush:

1 Like

Hi all, do you know if this issue has been solved with all the godd stuff done by the dev team ?