Describe the issue/error/question
Newbie trying to use HTTP Request Node to pull info from SharpSpring.com
Example Code:
What is the error message (if any)?
Invalid HTTP Header Token or Error 400 Request Rejected. It changes from run to run
Please share the workflow
{
"nodes": [
{
"parameters": {
"requestMethod": "POST",
"url": "http://api.sharpspring.com/pubapi/v1/",
"options": {},
"headerParametersUi": {
"parameter": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Content-Length",
"value": "="
}
]
},
"queryParametersUi": {
"parameter": [
{
"name": "accountID",
"value": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
},
{
"name": "secretKey",
"value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"name": "ID",
"value": "TEST1"
},
{
"name": "Method",
"value": "getLead"
},
{
"name": "Params",
"value": "{ \"id\":\"1\" }"
}
]
}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
20,
380
]
}
],
"connections": {}
}
(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)
Share the output returned by the last node
{“status”:“rejected”,“reason”:{“message”:"400 - “Error 400 (Bad Request)!!1"”,“name”:“Error”,“stack”:“Error: Request failed with status code 400\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (events.js:327:22)\n at endReadableNT (internal/streams/readable.js:1327:12)\n at processTicksAndRejections (internal/process/task_queues.js:80:21)”}}
Information on your n8n setup
- n8n version: latest as of 12/29/21
- Database you’re using (default: SQLite): PostGreSQL
- Running n8n with the execution process [own(default), main]:
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker