Error 403 after importuing curl command into 'http-request' node

Describe the problem/error/question

My curl command works OK directly on windows command, and also on ‘bruno’ platform. After importing the same curl command to the node, I got error 403.

What is the error message (if any)?

“forbidden - perhaps check your credentials? 403403 forbidden”.

since the same credentials works OK in my direct curl command and ‘bruno’, I really don’t think it is a credential issue. Is this a node config problem please?

Please share your workflow

type or paste code here
{
  "nodes": [
    {
      "parameters": {
        "url": "https://api.test.consoleconnect.com/api/auth/token",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "secret secret secret"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -900,
        -500
      ],
      "id": "4f865fe4-76f3-4792-8c3d-42796be5a60b",
      "name": "HTTP Console API",
      "retryOnFail": false
    }
  ],
  "connections": {},
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "dbea3a5d94fad0d13751cc60b9a39469e332a25b331d61ba003b1c4c8049e051"
  }
}

Share the output returned by the last node

no response

Information on your n8n setup

  • n8n version: 1.78.1
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: my PC (windows 11 pro)

Please kindly help, many many thanks!

Code flow for others:

Sadly, you’ve masked the authorization header (as you should), so none of us can test it to verify. Your only bet is to try using a different endpoint with some other service and see if you’re able to request data with that.

OR if you’re willing to DM me the token, I can verify it as well, however I won’t recommend this flow unless you have a read-only test account credential that you can share.

Thanks, yes, don’t want to share the authorization key. Please let me try other API commands.

I have just tried another end point, same error 403, however same curl command works OK in CMD windows directly, cannot figure out why. WHat else should I try please?

I am getting this from the output, does these indicate that my Auth token is successfully passed and rejected by the server please? Many thanks,

Item Index

0

Node type

n8n-nodes-base.httpRequest

Node version

4.2 (Latest)

n8n version

1.80.3 (Cloud)

Time

2/27/2025, 6:45:42 PM

Stack trace

NodeApiError: Forbidden - perhaps check your credentials? at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:525:33) at processTicksAndRejections (node:internal/process/task_queues:95:5) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:627:19) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:878:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1211:20

We’d really need a test API endpoint where we can try this. I have played around with several requests myself and they all work well.

Maybe the reason for the 403 is different? Maybe the user agent is the problem? Or the IP? If you control the server, have you tried checking the server logs?

Thanks for responding, I will try to get a “limited time” API_key to you , if you don’t mind “really” testing this out for me. Many thanks.

Before this try this:
For 403 errors when importing curl to HTTP Request node:

  1. Check the Authorization header format - n8n may need the full format:
Basic base64encoded_credentials

or

Bearer your_token
  1. Add these headers that curl might include automatically:
User-Agent: curl/7.xx
Accept: */*
  1. If using n8n Cloud, the API might be blocking requests from n8n’s IP range. Try testing with a local n8n installation instead.
  2. Verify the HTTP method matches your curl command (GET/POST/etc).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.