Can't connect to n8n API

Describe the problem/error/question

For some reason this workflow works on one instance of n8n but not on my other.
Currently trying to migrate over to a better cloud platform.
I’ve re-made the n8n API multiple times.
Restarted the instance multiple times.

However running the “Get many workflows” or anything else which is related to n8n API is failing.
Which is strange because in my credentials it says that the connection is green.

The workflow, just simple 2 nodes

This is the error that I’m getting.

NodeApiError: The resource you are requesting could not be found at ExecuteSingleContext.httpRequestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1365:9) at processTicksAndRejections (node:internal/process/task_queues:105:5) at ExecuteSingleContext.httpRequestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1737:11) at RoutingNode.rawRoutingRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/routing-node.ts:531:20) at ExecuteSingleContext.makeRoutingRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/routing-node.ts:564:11) at ExecuteSingleContext.cursorPagination (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/N8n/GenericFunctions.ts:117:19) at RoutingNode.makeRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/routing-node.ts:591:20) at async Promise.allSettled (index 0) at RoutingNode.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/routing-node.ts:234:29) at ExecuteContext.versionedNodeType.execute (/usr/local/lib/node_modules/n8n/src/node-types.ts:60:18)

Information on your n8n setup

  • n8n version: 1.113.3
  • Running n8n via : Hostinger (Docker)

Hello @Daniel_StrmCtrl
Can you make a reproducible usage?
It helps us to help you :slight_smile:

I don’t understand what I can do more than this?
This is always the consistent outcome whatever I do.

If it’s a different location where you migrated, check your URL base for the API in environment, connection may be good, but if it points to a different location an gets error with thepath?

As far I understand the “get many workflows” connects but doesn’t retrieve… right?

1 Like

That is correct.

Credentials say: “Connection tested successfully”

But any interaction with the n8n node (and it’s own instance) and I get the error as reported in the first post.

1 Like

The n8n API endpoint must be /api/v1/workflows (not /rest/workflows). Using the wrong path will result in a 404 error, even if your credentials test as “green”.

Or maybe check your proxy configurations…

I’m really confused. I don’t see these URL’s anywhere? Are you using HTTP instead of the native n8n node?

go to credentials and setup n8n credentials and set credentials like below and don’t forget to change url if it’s localhost that localhost + port

3 Likes

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