Hi everyone!
just wondering if I could get some help with trying to use the API.
I’m trying to make a call to a n8n instance I have running using curl. when calling to the local host the command executes perfectly and returns as expected (as shown below). However, when I try to make this same call to the tunnel URL of this instance I receive the error “408 request timeout”.
I got the commands from the API playground and they execute fine in that environment however if I attempt to make this call in the terminal and it times out then I am unable to go back to the API playground page as it shows “408 Request Timeout” on the webpage but only after I make a failed request in the terminal.
I’ve even tried turning off the firewall just in case that was blocking it but no luck, any help anyone can give me with this would be greatly appreciated quite stuck at the moment!
Below are the verbose curl commands (the first is the call to the local host and the second is to the tunnel URL):
C:\Users\kyles>curl -v -X "GET" "http://localhost:5678/api/v1/users?limit=100&includeRole=true" -H "accept: application/json" -H "X-N8N-API-KEY: n8n_api_MY_API_KEY"
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying [::1]:5678...
* Connected to localhost (::1) port 5678
> GET /api/v1/users?limit=100&includeRole=true HTTP/1.1
> Host: localhost:5678
> User-Agent: curl/8.4.0
> accept: application/json
> X-N8N-API-KEY: n8n_api_MY_API_KEY
>
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Content-Length: 390
< ETag: W/"186-gyJqmFLa2ZcOgWUF6GtJ2Gh4u6k"
< Vary: Accept-Encoding
< Date: Tue, 28 Nov 2023 11:30:22 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
{"data":[DATA REDACTED]}
C:\Users\kyles>curl -v -X "GET" "https://my_tunnel_URL.hooks.n8n.cloud/api/v1/users?limit=100&includeRole=true" -H "accept: application/json" -H "X-N8N-API-KEY: n8n_api_MY_API_KEY"
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying Tunnel.IP.Address:443...
* Connected to my_tunnel_URL.hooks.n8n.cloud (Tunnel.IP.Address) port 443
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* ALPN: server accepted http/1.1
* using HTTP/1.1
> GET /api/v1/users?limit=100&includeRole=true HTTP/1.1
> Host: my_tunnel_URL.hooks.n8n.cloud
> User-Agent: curl/8.4.0
> accept: application/json
> X-N8N-API-KEY: n8n_api_MY_API_KEY
>
< HTTP/1.1 408 Request Timeout
< Server: nginx/1.15.12
< Date: Tue, 28 Nov 2023 11:20:11 GMT
< Transfer-Encoding: chunked
< Connection: keep-alive
<
* Connection #0 to host my_tunnel_URL.hooks.n8n.cloud left intact