Describe the problem/error/question
I’m developing a node for an API that does not require authentication, but may include it in a request if utilizing/posting private resources. I’m using the programmatic approach utilizing the execute
method from the INodeType
. When I use the getCredentials
method, it throws an error (Node does not require credentials
) and stops the execution of the node when no credentials are selected. I’m having issues finding a way to check for set credentials before running the method or an option within the method to allow the node to continue when there are no credentials present or defined within the node. I have attempted to replicate the HttpRequest
node’s credential selection, but I’ve been unable to get the credentials to lock down to only my custom node rather than allowing selection of other credential types. What would be the best way to handle this so that the node can continue through execution if no creds are present and will be able to access the creds if they are? Would it be best to avoid using the n8n credential convention and build a new string field within the node for the bearer token authentication?
Information on your n8n setup
- n8n version: 1.39.1
- Database (default: SQLite): SQLite
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- Operating system: Windows