Http Request

Hi again,

next thing: I have a Restapi that i would to ask on. He have a API Key that works together with an auth parameter.
Does it use: header authentification ?
Have you any idea ? the users parameter in Header ?

Regards,
Stefan

@Stefan looks like the auth parameter goes in the body not the header. So add it to the body and remove the header ”users”.

I like to have to generatethis request: https://timebutler.de/api/v1/users together with a auth = 9988…

It sounds no so easy for me.

Regards,
Stefan

Now, i get this error: 404 not problem with auth…

ERROR: 404 - {“type”:“Buffer”,“data”:[10,10,10,60,33,68,79,67,84,89,80,69,32,104,116,109,108,62,10,10,10,10,10,10,10,10,10,60,104,116,109,108,32,108,97,110,103,61,34,100,101,34,62,10,9,60,104,101,97,100,62,10,9,9,60,109,101,116,97,32,99,104,97,114,115,101,116,61,34,85,84,70,45,56,34,62,10,9,9,60,116,105,116,108,101,62,84,105,109,101,98,117,116,108,101,114,32,45,32,85,114,108,97,117,98,115,118,101,114,119,97,108,116,117,110,103,32,117,110,100,32,65,98,119,101,115,101,110,104,101,105,116,115,112,108,97,110,101,114,32,102,195,188,114,32,73,104,114,101,32,77,105,116,97,114,98,101,105,116,101,114,60,47,116,105,116,108,101,62,10,9,9,60,109,101,116,97,32,99,111,110,116,101,110,116,61,34,119,105,100,116,104,61,100,101,118,105,99,101,45,119,105,100,116,104,44,105,110,105,116,105,97,108,45,115,99,97,108,101,61,49,44,109,97,120,105,109,117,109,45,115,99,97,108,101,61,49,34,32,110,97,109,101,61,34,118,105,101,119,112,111,114,116,34,62,60,108,105,110,107,32,104,114,101,102,61,34,47,99,115,115,47,115,116,121,108,101,45,50,46,55,46,57,52,46,99,115,115,34,32,114,101,108,61,34,115,116,121,108,101,115,104,101,101,116,34,32,116,121,112,101,61,34,116,101,120,116,47,99,115,115,34,32,47,62,60,108,105,110,107,32,114,101,108,61,34,115,104,111,114,116,99,117,116,32,105,99,111,110,34,32,104,114,101,102,61,34,47,97,122,101,47,95,110,111,83,116,97,110,100,97,108,111,110,101,47,105,109,97,103,101,115,47,102,97,118,105,99,111,110,46,112,110,103,63,118,61,50,46,55,46,57,52,34,32,47,62,60,109,101,116,97,32,110,97,109,101,61,34,116,104,101,109,101,45,99,111,108,111,114,34,32,99,111,110,116,101,110,116,61,34,35,51,54,55,101,97,56,34,62,60,109,101,116,97,32,110,97,109,101,61,34,97,112,112,108,101,45,109,111,98,105,108,101,45,119,101,98,45,97,112,112,45,116,105,116,108,101,34,32,99,111,110,116,101,110,116,61,34,84,105,109,101,98,117,116,108,101,114,34,62,60,109,101,116,97,32,112,114,111,112,101,114,116,121,61,34,111,103,58,116,105,116,108,101,34,32,99,111,110,116,101,110,116,61,34,77,105,116,32,116,105,109,101,98,117,116,108,101,114,46,100,101,32,100,101,110,32,85,114,108,97,117,98,44,32,90,101,105,116,101,114,102,97,115,115,117,110,103,32,117,110,100,32,65,98,119,101,115,101,110,104,101,105,116,101,110,32,73,104,114,101,114,32,77,105,116,97,114,98,101,105,116,101,114,32,117,110,100,32,84,101,97,109,115,32,112,108,97,110,101,110,46,32,69,105,110,102,97,99,104,44,32,115,105,99,104,101,114,32,117,110,100,32,98,101,113,117,101,109,46,32,74,101,116,122,116,32,107,111,115,116,101,110,108,111,115,32,97,117,115,112,114,111,98,105,101,114,101,110,46,34,32,47,62,60,109,101,116,97,32,112,114,111,112,101,114,116,121,61,34,111,103,58,100,101,115,99,114,105,112,116,105,111,110,34,32,99,111,110,116,101,110,116,61,34,77,105,116,32,116,105,109,101,98,117,116,108,101,114,46,100,101,32,100,101,110,32,85,114,108,97,117,98,44,32,90,101,105,116,101,114,102,97,115,115,117,110,103,32,117,110,100,32,65,98,119,101,115,101,110,104,101,105,116,101,110,32,98,101,113,117,101,109,32,112,108,97,110,101,110,32,117,110,100,32,105,109,109,101,114,32,100,101,110,32,195,156,98,101,114,98,108,105,99,107,32,98,101,104,97,108,116,101,110,46,32,74,101,100,101,114,32,77,105,116,97,114,98,101,105,116,101,114,32,101,114,104,195,164,108,116,32,115,101,105,110,32,101,105,103,101,110,101,115,32,78,117,116,122,101,114,107,111,110,116,111,46,32,74,101,116,122,116,32,107,111,115,116,101,110,108,111,115,32,97,117,115,112,114,111,98,105,101,114,101,110,46,34,32,47,62,60,109,101,116,97,32,112,114,111,112,101,114,116,121,61,34,111,103,58,116,121,112,101,34,32,99,111,110,116,101,110,116,61,34,119,101,98,115,105,116,101,34,32,47,62,60,109,101,116,97,32,112,114,111,112,101,114,116,121,61,34,111,103,58,117,114,108,34,32,99,111,110,116,101,110,116,61,34,104,116,116,112,115,58,47,47,116,105,109,101,98,117,116,108,101,114,46,100,101,47,97,122,101,47,101,114,114,111,114,47,101,114,114,111,114,52,48,52,46,106,115,112,34,32,47,62,60,109,101,116,97,32,112,114,111,112,101,114,116,121,61,34,111,103,58,115,105,116,101,95,110,97,109,101,34,32,99,111,110,116,101,110,116,61,34,84,105,109,101,98,117,116,108,101,114,34,32,47,62,60,109,101,116,97,32,112,114,111,112,101,114,116,121,61,34,111,103,58,105,109,97,103,101,34,32,99,111,110,116,101,110,116,61,34,104,116,116,112,115,58,47,47,116,105,109,101,98,117,116,108,101,114,46,100,101,47,97,122,101,47,95,110,111,83,116,97,110,100,97,108,111,110,101,47,105,109,97,103,101,115,47,116,105,109,101,98,117,116,108,101,114,45,116,101,97,115,101,114,45,100,101,46,112,110,103,34,32,47,62,60,109,101,116,97,32,112,114,111,112,101,114,116,121,61,34,111,103,58,108,111,99,97,108,101,34,32,99,111,110,116,101,110,116,61,34,100,101,95,68,69,34,32,47,62,60,109,101,116,97,32,112,114,111,112,101,114,116,121,61,34,111,103,58,108,111,99,97,108,101,58,97,108,116,101,114,110,97,116,101,34,32,99,111,110,116,101,110,116,61,34,101,110,95,71,66,34,32,47,62,60,109,101,116,97,32,112,114,111,112,101,114,116,121,61,34,111,103,58,108,111,99,97,108,101,58,97,108,116,101,114,110,97,116,101,34,32,99,111,110,116,101,110,116,61,34,101,110,95,85,83,34,32,47,62,60,47,104,101,97,100,62,60,98,111,100,121,32,99,108,97,115,115,61,34,115,107,105,110,45,98,108,117,101,32,115,107,105,110,45,115,117,114,102,101,114,34,62,10,9,60,104,101,97,100,101,114,32,99,108,97,115,115,61,34,104,101,97,100,101,114,34,62,9,9,9,10,9,9,32,60,97,32,104,114,101,102,61,34,47,34,32,99,108,97,115,115,61,34,108,111,103,111,34,62,60,105,109,103,32,105,100,61,34,105,109,103,108,111,103,111,34,32,115,114,99,61,34,47,105,109,97,103,101,115,47,108,111,103,111,47,108,111,103,111,46,112,110,103,63,118,61,50,46,55,46,57,52,34,32,97,108,116,61,34,76,111,103,111,34,62,60,47,97,62,10,60,110,97,118,32,99,108,97,115,115,61,34,110,97,118,98,97,114,32,110,97,118,98,97,114,45,115,116,97,116,105,99,45,116,111,112,34,62,10,10,9,9,9,9,10,9,9,9,9,60,100,105,118,32,99,108,97,115,115,61,34,110,97,118,98,97,114,45,114,105,103,104,116,34,62,10,9,9,9,60,97,32,99,108,97,115,115,61,34,104,111,109,101,72,100,32,104,105,100,100,101,110,45,120,115,34,32,104,114,101,102,61,34,47,102,101,97,116,117,114,101,115,47,34,62,70,101,97,116,117,114,101,115,60,47,97,62,10,9,9,9,60,97,32,99,108,97,115,115,61,34,104,111,109,101,72,100,34,32,104,114,101,102,61,34,47,100,101,109,111,47,34,62,76,105,118,101,32,68,101,109,111,60,47,97,62,10,9,9,9,60,97,32,99,108,97,115,115,61,34,104,111,109,101,72,100,32,104,105,100,100,101,110,45,120,115,34,32,104,114,101,102,61,34,47,112,114,101,105,115,101,47,34,62,80,114,101,105,115,101,60,47,97,62,10,10,9,9,9,60,97,32,99,108,97,115,115,61,34,104,111,109,101,72,100,34,32,104,114,101,102,61,34,47,116,111,103,103,108,101,108,97,110,103,34,32,116,105,116,108,101,61,34,69,110,103,108,105,115,104,34,32,111,110,109,111,117,115,101,111,118,101,114,61,34,36,40,116,104,105,115,41,46,104,116,109,108,40,36,40,116,104,105,115,41,46,104,116,109,108,40,41,46,114,101,112,108,97,99,101,40,39,32,68,69,39,44,32,39,32,69,78,39,41,41,34,32,111,110,109,111,117,115,101,111,117,116,61,34,36,40,116,104,105,115,41,46,104,116,109,108,40,36,40,116,104,105,115,41,46,104,116,109,108,40,41,46,114,101,112,108,97,99,101,40,39,32,69,78,39,44,32,39,32,68,69,39,41,41,34,62,60,105,32,99,108,97,115,115,61,34,104,105,100,100,101,110,45,120,115,32,102,97,32,102,97,45,103,108,111,98,101,34,62,60,47,105,62,32,68,69,60,47,97,62,10,9,9,9,60,97,32,99,108,97,115,115,61,34,104,111,109,101,72,100,32,114,101,103,34,32,104,114,101,102,61,34,47,110,117,116,122,101,114,107,111,110,116,111,45,101,114,115,116,101,108,108,101,110,34,32,116,105,116,108,101,61,34,74,101,116,122,116,32,107,111,115,116,101,110,108,111,115,32,97,110,109,101,108,100,101,110,34,62,82,101,103,105,115,116,114,105,101,114,101,110,60,47,97,62,10,9,9,9,60,97,32,99,108,97,115,115,61,34,104,111,109,101,72,100,32,104,111,109,101,76,111,103,105,110,34,32,104,114,101,102,61,34,47,108,111,103,105,110,47,34,62,60,105,32,99,108,97,115,115,61,34,102,97,32,102,97,45,117,115,101,114,32,104,105,100,100,101,110,45,120,115,34,62,60,47,105,62,32,65,110,109,101,108,100,101,110,60,47,97,62,10,9,9,9,10,9,9,60,47,100,105,118,62,10,9,60,47,110,97,118,62,10,60,47,104,101,97,100,101,114,62,10,60,100,105,118,32,99,108,97,115,115,61,34,119,114,97,112,112,101,114,32,114,111,119,45,111,102,102,99,97,110,118,97,115,32,114,111,119,45,111,102,102,99,97,110,118,97,115,45,108,101,102,116,34,62,10,10,9,9,60,97,115,105,100,101,32,99,108,97,115,115,61,34,114,105,103,104,116,45,115,105,100,101,34,32,115,116,121,108,101,61,34,109,97,114,103,105,110,45,108,101,102,116,58,48,34,62,10,9,9,9,60,115,101,99,116,105,111,110,32,99,108,97,115,115,61,34,99,111,110,116,101,110,116,32,115,107,105,110,45,115,117,114,102,101,114,34,62,13,10,13,10,13,10,13,10,13,10,13,10,13,10,60,110,111,115,99,114,105,112,116,62,60,100,105,118,32,99,108,97,115,115,61,34,99,97,108,108,111,117,116,32,99,97,108,108,111,117,116,45,100,97,110,103,101,114,32,106,115,119,97,114,110,34,62,60,105,32,99,108,97,115,115,61,34,102,97,32,102,97,45,101,120,99,108,97,109,97,116,105,111,110,32,102,97,45,53,120,34,62,60,47,105,62,32,83,105,101,32,104,97,98,101,110,32,105,110,32,73,104,114,101,109,32,66,114,111,119,115,101,114,32,74,97,118,97,83,99,114,105,112,116,32,100,101,97,107,116,105,118,105,101,114,116,46,32,68,105,101,115,101,32,83,111,102,116,119,97,114,101,32,102,117,110,107,116,105,111,110,105,101,114,116,32,106,101,100,111,99,104,32,110,105,99,104,116,32,111,104,110,101,32,74,97,118,97,83,99,114,105,112,116,46,32,66,105,116,116,101,32,97,107,116,105,118,105,101,114,101,110,32,83,105,101,32,74,97,118,97,115,99,114,105,112,116,32,105,110,32,73,104,114,101,109,32,66,114,111,119,115,101,114,46,60,47,100,105,118,62,60,47,110,111,115,99,114,105,112,116,62,10,60,104,49,62,60,105,32,99,108,97,115,115,61,34,102,97,32,102,97,45,109,101,104,45,111,34,62,60,47,105,62,32,70,101,104,108,101,114,60,47,104,49,62,10,60,100,105,118,32,99,108,97,115,115,61,34,99,97,108,108,111,117,116,32,99,97,108,108,111,117,116,45,100,97,110,103,101,114,34,62,76,101,105,100,101,114,32,103,105,98,116,32,101,115,32,100,105,101,32,118,111,110,32,73,104,110,101,110,32,103,101,115,117,99,104,116,101,32,83,101,105,116,101,32,110,105,99,104,116,32,111,100,101,114,32,115,105,101,32,119,117,114,100,101,32,101,110,116,102,101,114,110,116,46,60,47,100,105,118,62,10,60,112,62,87,101,110,110,32,83,105,101,32,100,101,110,32,70,101,104,108,101,114,32,109,101,108,100,101,110,32,109,195,182,99,104,116,101,110,58,10,60,97,32,104,114,101,102,61,34,46,47,100,111,63,104,97,61,99,110,116,38,97,99,61,49,34,62,60,105,32,99,108,97,115,115,61,34,102,97,32,102,97,45,101,110,118,101,108,111,112,101,45,111,34,62,60,47,105,62,32,90,117,109,32,75,111,110,116,97,107,116,102,111,114,109,117,108,97,114,60,47,97,62,10,10,60,47,112,62,10,60,97,32,99,108,97,115,115,61,34,98,116,110,32,98,116,110,45,112,114,105,109,97,114,121,34,32,104,114,101,102,61,34,46,47,34,62,60,105,32,99,108,97,115,115,61,34,102,97,32,102,97,45,104,111,109,101,34,62,60,47,105,62,32,90,117,114,32,83,116,97,114,116,115,101,105,116,101,60,47,97,62,10,10,10,10,10,60,100,105,118,32,99,108,97,115,115,61,34,118,105,115,105,98,108,101,45,112,114,105,110,116,45,98,108,111,99,107,32,117,112,115,112,97,99,101,34,62,80,111,119,101,114,101,100,32,98,121,32,116,105,109,101,98,117,116,108,101,114,46,100,101,60,98,114,62,60,105,109,103,32,115,114,99,61,34,47,105,109,97,103,101,115,47,108,111,103,111,47,108,111,103,111,95,98,119,95,115,46,112,110,103,34,32,97,108,116,61,34,76,111,103,111,34,62,60,47,100,105,118,62,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,47,115,101,99,116,105,111,110,62,10,32,32,32,32,32,32,32,32,32,32,32,32,60,47,97,115,105,100,101,62,10,32,32,32,32,32,32,32,32,60,47,100,105,118,62,10,32,32,32,32,32,32,32,32,60,102,111,111,116,101,114,32,99,108,97,115,115,61,34,102,111,111,116,101,114,32,104,105,100,100,101,110,45,112,114,105,110,116,34,62,60,100,105,118,32,99,108,97,115,115,61,34,114,111,119,34,62,10,9,9,9,10,9,9,9,9,60,100,105,118,32,99,108,97,115,115,61,34,99,111,108,45,120,115,45,49,50,32,99,111,108,45,108,103,45,52,32,102,111,111,116,67,108,97,105,109,34,62,10,9,9,9,9,9,60,112,32,99,108,97,115,115,61,34,102,111,111,116,67,108,97,105,109,84,105,116,108,101,34,62,60,105,32,99,108,97,115,115,61,34,102,97,32,102,97,45,104,101,97,114,116,45,111,34,62,60,47,105,62,32,195,156,98,101,114,32,49,48,48,46,48,48,48,32,78,117,116,122,101,114,60,47,112,62,10,9,9,9,9,9,60,112,62,60,105,32,99,108,97,115,115,61,34,102,97,32,102,97,45,112,108,117,115,34,62,60,47,105,62,32,80,108,117,115,32,116,97,117,115,101,110,100,101,32,78,117,116,122,101,114,32,60,97,32,104,114,101,102,61,34,47,115,116,97,110,100,97,108,111,110,101,47,34,32,116,97,114,103,101,116,61,34,95,98,108,97,110,107,34,62,111,110,32,112,114,101,109,105,115,101,60,47,97,62,60,47,112,62,10,9,9,9,9,9,60,112,62,60,105,32,99,108,97,115,115,61,34,102,97,32,102,97,45,119,114,101,110,99,104,34,62,60,47,105,62,32,52,46,52,57,52,46,50,56,54,32,65,98,119,101,115,101,110,104,101,105,116,115,101,105,110,116,114,195,164,103,101,60,47,112,62,10,9,9,9,9,9,60,112,62,60,105,32,99,108,97,115,115,61,34,102,97,32,102,97,45,99,104,101,99,107,34,62,60,47,105,62,32,83,101,10

Can you please send me the API-Token via private message that I can test. I can then post the finished setup here (without your token).

1 Like

@Stefan try it like this.

{
  "nodes": [
{
  "parameters": {},
  "name": "Start",
  "type": "n8n-nodes-base.start",
  "typeVersion": 1,
  "position": [
    250,
    300
  ]
},
{
  "parameters": {
    "requestMethod": "POST",
    "url": "https://timebutler.de/api/v1/users",
    "options": {},
    "bodyParametersUi": {
      "parameter": [
        {
          "name": "auth"
        }
      ]
    }
  },
  "name": "HTTP Request",
  "type": "n8n-nodes-base.httpRequest",
  "typeVersion": 1,
  "position": [
    450,
    450
  ]
}
  ],
  "connections": {}
} 

just add the auth you have.

do you want to retrieve all the users or add a user? @Stefan. If you want to retrieve the users then change the post for a get

Ricardo,

thank you, but these give me a 401 !

ERROR: 401 - “401 - Auth information missing, invalid or api access has been deactivated\r\n”

StatusCodeError: 401 - "401 - Auth information missing, invalid or api access has been deactivated\r\n"
    at new StatusCodeError (/usr/local/lib/node_modules/n8n/node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback (/usr/local/lib/node_modules/n8n/node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/n8n/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.self.callback (/usr/local/lib/node_modules/n8n/node_modules/request/request.js:185:22)
    at Request.emit (events.js:210:5)
    at Request.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:210:5)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:299:28)
    at IncomingMessage.emit (events.js:215:7)

Regards,
Stefan

What @RicardoE105 did send is correct according to their documentation. Sadly does their documentation seems to be wrong. Instead of HTTP Post Parameter “auth” it has to be send as a GET. Also does the API return data as CSV.

So this one will work:

{
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "name": "Spreadsheet File",
      "type": "n8n-nodes-base.spreadsheetFile",
      "typeVersion": 1,
      "position": [
        1050,
        400
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://timebutler.de/api/v1/users",
        "responseFormat": "file",
        "options": {},
        "queryParametersUi": {
          "parameter": [
            {
              "name": "auth",
              "value": ""
            }
          ]
        }
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        860,
        400
      ]
    }
  ],
  "connections": {
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Spreadsheet File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}