Please help the newbie

Good afternoon! I'm quite new to using Node-Red, I can't solve the problem. I want to get data from a cloud service, but I can't find information on how to implement the request:

Запрос:

POST /v1/auth/open HTTP/1.1
Host: api.owencloud.ru
Accept: /
Content-Length: 68
Content-Type: application/x-www-form-urlencoded

{ "login":"admin@owen.cloud", "password":"password123" }

The below flow returns an error saying wrong credentials. You might need to add them back into the http request node when testing it.

[{"id":"52c04527.c92c2c","type":"http request","z":"ced96e30.86933","name":"","method":"POST","ret":"obj","paytoqs":"body","url":"https://api.owencloud.ru/v1/auth/open","tls":"","persist":false,"proxy":"","authType":"basic","x":1060,"y":580,"wires":[["13d8cd07.428193"]]},{"id":"13d8cd07.428193","type":"debug","z":"ced96e30.86933","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":580,"wires":[]},{"id":"587c6431.95ce3c","type":"inject","z":"ced96e30.86933","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":900,"y":580,"wires":[["52c04527.c92c2c"]]}]

Thank you very much, I have a real account, I will test it tomorrow.

Good afternoon! Your option did not work, it turned out like this.


Either that is NOT the standard built in http request node - OR - you have an old version of node-red.

I suspect you are using node-red-contrib-https which is almost 5y old.

It should look like this...

If you are using node-red-contrib-https then I recommend to switch to the built in http-request node.

PS: What version of node-red are you using?

That is the same result I was getting. The error status 0 means it returned something successfully, and the 401 custom error. This means there is something not right with the username and password supplier in their API documentation.

Good afternoon! In the end, what happened. If the HTTP request node uses an authentication, then it doesn't work. And if you send a request using the function node and write a username and password there, then everything is normal. Apparently this is a feature of my OwenCloud service.


Good afternoon! Version NodeRed v 1.3.2. Everything is correct you said that I am doing wrong and the http request node can send both http and https requests, the only thing I need is to use the authentication via the node function. Initially, when I read the documentation, I saw that the default http request is used, which confused me.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.