# Help for https command

**URL:** https://discourse.nodered.org/t/help-for-https-command/9496
**Category:** General
**Created:** [27 March 2019 12:48 UTC](https://discourse.nodered.org/t/help-for-https-command/9496 "2019-03-27T12:48:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mike67](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mike67](https://discourse.nodered.org/u/mike67)
#### Post date: [27 March 2019 12:48 UTC](https://discourse.nodered.org/t/help-for-https-command/9496/1 "2019-03-27T12:48:03Z")

</div>

Hello  
I use a device with wich it is possible to communicate with https requests.  
So, I tried to use the http or even the https node (https contrib installed in adition to the stanard http)

Here is the command I need to send 🙂  
[https://admin:mGuard@192.168.10.21/nph-status.cgi?path=/network/modem/stat](https://admin:mGuard@192.168.10.21/nph-status.cgi?path=/network/modem/stat)  
When I send this command with Chrome, for example, I get e reply as

```
/network/modem/state=offline
```

But i don't know exactly what to put in wich field of the http or https node.  
For example, POST, GET, etc... ??? What must i use?

Most of times, no matter wich syntax I use, I get this

27/03/2019 à 13:49:00[node: 42c0a453.10ba4c](http://192.168.10.19:1880/#)msg : error

"Error: unable to verify the first certificate"

27/03/2019 à 13:49:00[node: 9a301fb3.52958](http://192.168.10.19:1880/#)msg : Object

object

\_msgid: "a924557a.af9918"

topic: ""

payload: "Error: unable to verify the first certificate : [https://admin:mGuard@192.168.10.21/nph-status.cgi?path=/network/modem/state](https://admin:mGuard@192.168.10.21/nph-status.cgi?path=/network/modem/state)"

statusCode: "UNABLE\_TO\_VERIFY\_LEAF\_SIGNATURE"

27/03/2019 à 13:46:54[node: 9a301fb3.52958](http://192.168.10.19:1880/#)msg : Object

object

\_msgid: "3294fd59.2b82f2"

topic: ""

payload: "Error: unable to verify the first certificate : [https://admin:mGuard@192.168.10.21/nph-status.cgi?path=/network/modem/state](https://admin:mGuard@192.168.10.21/nph-status.cgi?path=/network/modem/state)"

statusCode: "UNABLE\_TO\_VERIFY\_LEAF\_SIGNATURE"

Can you help me, first to know what I must write in each field of the node, and then, if something specific must be done to send an https request.  
Thanks

---

<div class="post-metadata">

### Author: ![realjax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realjax/32/895_2.png) [@realjax](https://discourse.nodered.org/u/realjax)
#### Post date: [27 March 2019 17:14 UTC](https://discourse.nodered.org/t/help-for-https-command/9496/2 "2019-03-27T17:14:17Z")

</div>

Seems like the device has a self signed certificate. Either that or the certificate is invalid for whatever reason. When you are testing in Chrome ( which is a GET request by the way) do you (or did you earlier) have to approve the certificate first?

---

<div class="post-metadata">

### Author: ![mike67](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mike67](https://discourse.nodered.org/u/mike67)
#### Post date: [27 March 2019 21:11 UTC](https://discourse.nodered.org/t/help-for-https-command/9496/3 "2019-03-27T21:11:53Z")

</div>

Hello RealJax.  
Yes, using chrome, before I send this request, I had to aprove the certificat.  
And I confirm this is a self signed one.  
How can I handle this in nodeRed?

---

<div class="post-metadata">

### Author: ![realjax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realjax/32/895_2.png) [@realjax](https://discourse.nodered.org/u/realjax)
#### Post date: [28 March 2019 08:09 UTC](https://discourse.nodered.org/t/help-for-https-command/9496/4 "2019-03-28T08:09:48Z")

</div>

Don't think you can. But maybe this page can help you further:

> <https://stackoverflow.com/questions/10888610/ignore-invalid-self-signed-ssl-certificate-in-node-js-with-https-request>

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 March 2019 08:34 UTC](https://discourse.nodered.org/t/help-for-https-command/9496/5 "2019-03-28T08:34:18Z")

</div>

You can use LetsEncrypt to provide yourself with a valid certificate. It is not difficult.

---

<div class="post-metadata">

### Author: ![realjax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realjax/32/895_2.png) [@realjax](https://discourse.nodered.org/u/realjax)
#### Post date: [28 March 2019 10:07 UTC](https://discourse.nodered.org/t/help-for-https-command/9496/6 "2019-03-28T10:07:12Z")

</div>

The problem is that the device being talked to only seems to accept ssl connections ( which is rather odd I think) and then LetsEncrypt is not going to help.

Maybe putting the device behind a reverse proxy like Nginx first might work.

But @mike67 , assuming the device you speak of is a an MGUARD-router, have a look at this router settings to see if there's a way to disable SSL acces. ( and while you're at it, also change the default password 🙂 )

---

<div class="post-metadata">

### Author: ![mike67](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mike67](https://discourse.nodered.org/u/mike67)
#### Post date: [28 March 2019 10:51 UTC](https://discourse.nodered.org/t/help-for-https-command/9496/7 "2019-03-28T10:51:00Z")

</div>

Hello  
Finally that works  
In fact, it was jest necessary to renew  
the certificats.  
And the Method is GET with user authentication

Thanks for your help
