Describe the problem/error/question
I want to execute a workflow via PHP (with CURL?) or if that’s not possible then with Javascript.
I have just a little knowledge on API’s and even less with Authentication but I’m trying to figure out how to use the n8n API. I’ve created a key but am a little lost as to what to do next. I tried using the Sandbox and get a CURL command but not sure how to use that with PHP. Also running the CURL command on a windows machine generates a few errors. It seems like it doesn’t know what do do with the -H parameters.
C:> curl -X ‘GET’ ‘http://10…REDACTED…:5678/api/v1/workflows/38’ -H ‘accept: application/json’ -H ‘X-N8N-API-KEY: n8n_api_43865_REDACTED’
curl: (3) URL using bad/illegal format or missing URL
curl: (6) Could not resolve host: application
curl: (3) URL using bad/illegal format or missing URL
Any help would be much appreciated!
What is the error message (if any)?
see above
Please share your workflow
n/a
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
n/a
Information on your n8n setup
- n8n version: 0.233.1 (Enterprise Version)
- Database (default: SQLite): Postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): app/npm
- Operating system: Ubuntu Linux