After upgrading to 0.196 n8n API calls from n8n HTTP Request node fail on missing authorization

After upgrading to 0.196 n8n API calls from n8n HTTP Request node fail on missing authorization

What’s changed?

We would need more information to be able to help. For example what version you did upgrade from and the HTTP Request node.

Originally I was upgrading from 0.193.3 to 198.2.
After I got the problem I’ve searched for the last version that works - 0.195.5

The node:

One thing I’ve noticed in webhooks.site is that the X-N8N-API-KEY header name is sent in lower case

Just to make sure I understand you correctly. The problem is not that nodes that worked before do not work anymore (how I understood your question originally), you mean that if you create a new HTTP Request Node and try to make a request with it, it fails (my assumptions comes from your example using an HTTP Request node of version 2 which did not exist prior to version 0.196.0).

Hi @mattesilver, just wanted to quickly jump in and let you know that I’ve tested calling the n8n REST API with both versions of the HTTP Request node, the old and the new one:

Both worked fine for me and returned the expected result:

Did you (or another user of your instance) perhaps simply change the API key or added a whitespace in any of the fields in your n8n API credentials?

@jan

The problem is not that nodes that worked before do not work anymore (how I understood your question originally), you mean that if you create a new HTTP Request Node and try to make a request with it, it fails (my assumptions comes from your example using an HTTP Request node of version 2 which did not exist prior to version 0.196.0).

In this case it should be the older version. I’ll check what’s happened and come back to you.
I might have changed something while testing different versions and endpoints.

@MutedJam

Did you (or another user of your instance) perhaps simply change the API key or added a whitespace in any of the fields in your n8n API credentials?

API Key hasn’t been changed, only n8n version and I did a copy of HttpRequest node to see what’s being sent to webhook.site .
I have older json exports backed up; I’ll take a look and let you know.

Thank you both for your time and hints.
:green_heart:

1 Like

Hi,

Did you solve your issue ? I’ve got the same problem since I update in v0.201.0.
When I try to make a curl on n8n api I’ve got the following error :

{“code”:401,“message”:“Authorization is required!”}

Here, my CURL request :

curl ‘http://localhost:4567/api/v1/workflows’ -H ‘X-N8N-API-KEY: n8n_api_*************’

My current solution is to stick to 0.195 :person_shrugging:t2:

I found a dirty solution but it works.

I’ve to set 2 headers. One header with the X-N8N-API-KEY key and an other with Authorization (basic) header.

I think this issue should be fix.