I am trying ti build a customised node and am following the n8n declarative tutorial which calls the nasa api. I have finished writing the code but am getting a 403 error for some reason and am unable to track the source of this error.
What is the error message (if any)?
HTTP Code
403
Stack
NodeApiError: Request failed with status code 403
at RoutingNode.runNode (/Users/aaditroychowdhury/.nvm/versions/node/v18.7.0/lib/node_modules/n8n/node_modules/n8n-workflow/src/RoutingNode.ts:221:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Workflow.runNode (/Users/aaditroychowdhury/.nvm/versions/node/v18.7.0/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1334:11)
at /Users/aaditroychowdhury/.nvm/versions/node/v18.7.0/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:952:29
Oh, so what you are saying is that following the exact tutorial leads to the error you have seen? Can you share your project folder so we can take a closer look?
hey @MutedJam. I am attaching the link to the github repository as the folder is not being accepted here for some reason. github project repository
Hope this helps.
my bad @Jon. I am attaching the link again. The credentials seem fine to me.
I tried to redo the entire thing and now the node does not even appear as an option on the n8n node options. project repository
hey @Jon which API key are you using. Are you generating it via the NASA API?
Are you changing the api under the
authenticate = {
type: ‘generic’,
properties: {
qs: {
‘api_key’: ‘={{$credentials.apiKey}}’
}
},
} as IAuthenticateGeneric;
in NasaPicsApi.credentials.ts
I guess I am making some silly error as I am new to n8n.
You are still not using the correct nodes folder that is why it is not working. You need to use ~/.n8n/nodes the full path for that would be something like /Users/aaditroychowdhury/.n8n/nodes so the commands would be…
npm install
npm link
cd ~/.n8n/nodes
npm link n8n-nodes-nasapics
n8n start
If ~/.n8n/nodes shows an error run mkdir ~/.n8n/nodes then the cd command.