Quipu API; HTTP Request Node Returns 404 Error for a Working Endpoint

Hello n8n community,

I am currently facing an issue with the HTTP Request node in n8n and would really appreciate any assistance.

Describe the problem

I am trying to make a GET request to the following endpoint: https://getquipu.com/invoices (or any other available, see docs here). This endpoint requires two headers: Authorization and Accept. When I make the same GET request using cURL, R, or Python, it works flawlessly, but when using n8n’s HTTP Request node, I receive an error.

I initially thought it was Oauth2 related. But the token** that I retrieve in an earlier node (or externally) seems to be received just fine at the endpoint either send explicitly as header or using Header Auth within n8n. I used webhook.site to inspect what is sent to the server, and the requests appear to be identical between the R scripts and n8n.

** As a side information: Interestingly, the node to request the Token didn’t work initially if I followed regular set up, that is to send the required parameters explicitly as “Send Body” in the HTTP request node, but had to include it in the URL itself through “https://getquipu.com/oauth/token?grant_type=client_credentials”.

Minimal Example within R

# Load the httr library
library(httr)

# Define the URL, headers, and page number
url <- "https://getquipu.com/invoices"
bearer_token <- "YOUR_BEARER_TOKEN"
page_number <- 1 

# Construct the full URL with query parameter
full_url <- paste0(url, "?page[number]=", page_number)

# Define headers
headers <- c(
  Authorization = paste0("Bearer ", bearer_token),
  Accept = "application/vnd.quipu.v1+json"
)

# Make the GET request
response <- GET(full_url, add_headers(.headers=headers))

# Print the response
print(content(response))

What is the error message (if any)?

ERROR: The resource you are requesting could not be found (HTTP Code 404)

Please share your workflow

Information on your n8n setup

  • n8n version: 0.225.1
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Within Coolify in Docker
  • Operating system: Linux

Question:

Is there something specific in n8n’s HTTP Request node that might cause this issue, or is there a setting I might have overlooked? Any guidance would be greatly appreciated!

Thank you in advance!

Doh, I was finally to track down the issue.

After further testing and proper look at the webhook.site results, I figured out that the ‘Accept’ Header info was never passed to the webhook which solely received the default.

Accept: application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9,
 image/*;q=0.8, */*;q=0.7

As per documentation, the endpoint needs to receive

Accept: application/vnd.quipu.v1+json

When I create the http request node, I used the “Import cURL” Feature, which inserted the ‘Accept’ Parameter’s Name as “Accept”, i.e. starting with upper case.

However, following this thread to override http request header ‘Accept’ in the community, led me to the solution to write the name in lower case!

I simply thought that the default Accept Header received by the webhook was sufficient and never bothered to investigate…

While this is clearly on me, as a feature suggestion, maybe the “Import cURL” feature could automatically parse it to lower case by default?

2 Likes

Hi @peter_brueck, glad you figured it out, thank you so much for sharing (edit: and welcome to the community :tada:)!

I appreciate the feature suggestion, and n8n would in fact handle the lowercase headers since version 0.227.0. So hopefully future users will not be caught off guard anymore :slight_smile:

1 Like