FeatureFuel
0

HTTP Request does not refresh credentials when the API reports expiry in the response body

Source: n8n-io/n8n#38508 · opened by @luka-mimi
Bug Description HTTP Request refreshes OAuth2 and other refreshable credentials only when the HTTP status matches the expiry rule. The default rule is HTTP 401. Some credential types also use tokenExpiredStatusCode. Some APIs keep HTTP 200 and put the expiry signal in the body. One common shape is { "errcode": 40001 }. The node treats this response as success. It does not refresh the credential. It does not retry the request. The workflow continues with the expired token. This happens with Generic OAuth2 and with predefined credentials that can refresh. To Reproduce 1. Create a Generic OAuth2 credential that n8n can refresh. 2. Add an HTTP Request node. Set Authentication to Generic Credential Type and select that OAuth2 credential. 3. Point the URL at an API that returns HTTP 200 and a body such as { "errcode": 40001 } when the access token is expired. Do not return HTTP 401. 4. Execute the node. 5. The node returns the 200 body. n8n does not refresh the cred…

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests