# Please help the newbie

**URL:** <https://discourse.nodered.org/t/please-help-the-newbie/45273>\
**Category:** General\
**Created:** [6 May 2021 13:04 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273 "2021-05-06T13:04:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danil\_naladka](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@Danil\_naladka](https://discourse.nodered.org/u/Danil_naladka)\
**Post date:** [6 May 2021 13:04 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273/1 "2021-05-06T13:04:07Z")

</div>

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](http://api.owencloud.ru)  
Accept: _/_  
Content-Length: 68  
Content-Type: application/x-www-form-urlencoded

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

---

<div class="post-metadata">

**Author:** ![droberts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/droberts/32/40295_2.png) [@droberts](https://discourse.nodered.org/u/droberts)\
**Post date:** [6 May 2021 13:55 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273/2 "2021-05-06T13:55:30Z")

</div>

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

```auto
[{"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"]]}]

```

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/6/962c6b3b8c2f49cbb22079bd6e0438d88e538acd.png)

---

<div class="post-metadata">

**Author:** ![Danil\_naladka](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@Danil\_naladka](https://discourse.nodered.org/u/Danil_naladka)\
**Post date:** [10 May 2021 12:14 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273/3 "2021-05-10T12:14:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Danil\_naladka](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@Danil\_naladka](https://discourse.nodered.org/u/Danil_naladka)\
**Post date:** [11 May 2021 09:24 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273/4 "2021-05-11T09:24:08Z")

</div>

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

 ![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/2/628190005b6f5173cd6c055b4fb01324d5edfd1c.png)  
 ![2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/7/272eae48bcf002a81798cb47a371ca99c21b6c98.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 May 2021 10:35 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273/5 "2021-05-11T10:35:38Z")

</div>

> [@Danil\_naladka](#):
>
> ![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/2/628190005b6f5173cd6c055b4fb01324d5edfd1c.png)

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](https://flows.nodered.org/node/node-red-contrib-https) which is almost 5y old.

It should look like this...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/5/75ca713853918dc0f2cfb1ec47d9929bb39bc8a8.png)

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?

---

<div class="post-metadata">

**Author:** ![droberts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/droberts/32/40295_2.png) [@droberts](https://discourse.nodered.org/u/droberts)\
**Post date:** [11 May 2021 13:41 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273/6 "2021-05-11T13:41:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Danil\_naladka](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@Danil\_naladka](https://discourse.nodered.org/u/Danil_naladka)\
**Post date:** [12 May 2021 03:21 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273/7 "2021-05-12T03:21:07Z")

</div>

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.

 ![nodered1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/468837e9286ff70d5c9d9989bd5093b2128edb89.png)  
 ![nodered2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/4/c474d7f337b5b6b82dfd49304c30ee5361df20f3.png)

---

<div class="post-metadata">

**Author:** ![Danil\_naladka](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@Danil\_naladka](https://discourse.nodered.org/u/Danil_naladka)\
**Post date:** [12 May 2021 03:29 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273/8 "2021-05-12T03:29:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 July 2021 03:29 UTC](https://discourse.nodered.org/t/please-help-the-newbie/45273/9 "2021-07-11T03:29:22Z")

</div>

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