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.
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.
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.
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.
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)”