N8n to Magento API call fails ( curl works fine)

Describe the problem/error/question

I have the n8n selfhosted in docker on-prem, our magento is on aws, I can curl the magento with out any issue (curl -X GET “https://xxxxxxx.com/rest/V1/modules”
-H “Authorization: Bearer xxxxxxxxxx”
-H “Content-Type: application/json”)
but doing the same in n8n as the first step, it shows me “Code 405, The requested method GET is not allowed for this URL.”
Any idea why?

What is the error message (if any)?

Code 405. The requested method GET is not allowed for this URL.

Please share your workflow

This is the first step API call to Magento

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.121.3
  • Database : default Docker deployment
  • Running n8n via : Self Hosted Docker
  • Operating system: Ubuntu24

hello @ROOTLOOP

The example and the URL in the HTTP Request node differ. There is a part with /rest**/all**/V1 which is differs

that was just one of my attemps, I tried “all” , “default“ and without them , all got the same 405 code

I would suggest running the same curl command from inside the n8n container to confirm it reaches the same endpoint, and also checking whether the request is being redirected to HTTP before reaching Magento.

Another interesting thing is that the Apache is answering you on port 80, and you are requesting on port 443. Which may indicate there is a network issue (routing/subnetting/dns)