[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 ?

Inoreader developer here. The issue has now been fixed, and access tokens should refresh correctly without manual intervention.

It was caused by an aggressive garbage collection of access tokens on our end. If a workflow calls the API less than 1 times per hour, The access token could get deleted (not just expired) before the refresh token was requested. In that case our API was returning 403 instead of 401. This is now corrected by relaxing the garbage collection, giving n8n a chance to call the workflow and refresh the token, and also sending 401 instead of 403 in this specific case.

Please do the following once:

1. Reconnect your Inoreader credentials in n8n (one last time).

2. Save the workflow.

3. Let it run normally — you should no longer see daily authentication breaks.

No changes to your app settings or scopes are required.

Let me know if this fixes it for y’all.

Hello and thanks a lot for you answer !

On the Inoreader settings, have we got to change the Redirection URI ?

They are empty for now.

You can use this URL from n8n to secure your credentials, but you can also leave it empty.

Starting with Beta version 2.12.0, it seems that this problem has been solved and a solution has been provided. I haven’t tested it yet, but it’s there and that’s great!

core: Add configurable HTTP status code for OAuth2 token refresh (#26641) (9dc8b44)”