# Problem accessing external website

**URL:** <https://discourse.nodered.org/t/problem-accessing-external-website/14905>\
**Category:** Dashboard\
**Created:** [29 August 2019 12:52 UTC](https://discourse.nodered.org/t/problem-accessing-external-website/14905 "2019-08-29T12:52:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![menno](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@menno](https://discourse.nodered.org/u/menno)\
**Post date:** [29 August 2019 12:52 UTC](https://discourse.nodered.org/t/problem-accessing-external-website/14905/1 "2019-08-29T12:52:43Z")

</div>

Hi guys,  
i have a website that is accessable from the internet  
[https://myuser:mypassword@www.XXXXXXX.nl/ws2/Reports-bad.htm](https://myuser:mypassword@www.XXXXXXX.nl/ws2/Reports-bad.htm)  
this works great !!

but if i running this config it still gets this message  
msg.payload : array[1]  
array[1]  
0: "

## Error #401: Unauthorized

* * *
"

i tried all the options in "use authentication" but nothing is working  
can someone help me here ??

many many thanks in advance  
m

[{"id":"d62d3350.171db","type":"inject","z":"2e50eaad.878196","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":420,"wires":[["3bf52f17.04cf6"]]},{"id":"66f82665.d9b308","type":"debug","z":"2e50eaad.878196","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":720,"y":440,"wires":},{"id":"3bf52f17.04cf6","type":"http request","z":"2e50eaad.878196","name":"access the site","method":"GET","ret":"txt","paytoqs":false,"url":"[https://myuser:mypassword@www.XXXXXXX.nl/ws2/Reports-bad.htm","tls":"","proxy":"","authType":"","x":290,"y":520,"wires":[["d5dbcb11.d7fe08"]]},{"id":"d5dbcb11.d7fe08","type":"html","z":"2e50eaad.878196","name":"","property":"payload","outproperty":"payload","tag":"html","ret":"html","as":"single","x":360,"y":620,"wires":[["66f82665.d9b308](https://myuser:mypassword@www.XXXXXXX.nl/ws2/Reports-bad.htm%22,%22tls%22:%22%22,%22proxy%22:%22%22,%22authType%22:%22%22,%22x%22:290,%22y%22:520,%22wires%22:%5B%5B%22d5dbcb11.d7fe08%22%5D%5D%7D,%7B%22id%22:%22d5dbcb11.d7fe08%22,%22type%22:%22html%22,%22z%22:%222e50eaad.878196%22,%22name%22:%22%22,%22property%22:%22payload%22,%22outproperty%22:%22payload%22,%22tag%22:%22html%22,%22ret%22:%22html%22,%22as%22:%22single%22,%22x%22:360,%22y%22:620,%22wires%22:%5B%5B%2266f82665.d9b308)"]]}]

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [29 August 2019 14:08 UTC](https://discourse.nodered.org/t/problem-accessing-external-website/14905/2 "2019-08-29T14:08:26Z")

</div>

Hi @menno

for future reference, please have a read of [this post](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506) that explains how to share code in the forum properly.

The HTTP Request node doesn't support providing username/password as part of the url, you have to provide them separately in the node's configuration. You say you've tried the 'use authentication' options, but the flow you've shared doesn't have it enabled.

Edit the node and tick the 'Use authentication' box. Make sure 'basic authentication' is selected, then enter your username and password. Don't forget to remove the values from the url as well.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e3f1bd337b8305e772a6885a639ffcc4fec242f7.png)

If that still doesn't work, reexport the HTTP Request node (we don't need the whole flow) and share it here. Any credentials such as username/password will not be included in the export, but we'll be able to see how else the node is configured.

---

<div class="post-metadata">

**Author:** ![menno](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@menno](https://discourse.nodered.org/u/menno)\
**Post date:** [29 August 2019 17:04 UTC](https://discourse.nodered.org/t/problem-accessing-external-website/14905/3 "2019-08-29T17:04:27Z")

</div>

ok thanks  
completely setup a new flow

```auto
[{"id":"fe770289.13a3f","type":"http request","z":"2e50eaad.878196","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://intranet.XXX.xx/ws2/Reports/hostmonitor-bad.htm","tls":"","proxy":"","authType":"basic","x":440,"y":460,"wires":[["3a01e2b.36e8c1e"]]}]

```

i get :

## Error #401: Unauthorized

* * *

i hope you guys can help me  
i know for sure that the password is OK , because i use it everyday 🙂

but i want to make it work with the secure setting (https:/....)

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/ec6302d127b3f9dd5d2edda04f632977afa2d7c1.png)

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [29 August 2019 19:17 UTC](https://discourse.nodered.org/t/problem-accessing-external-website/14905/4 "2019-08-29T19:17:44Z")

</div>

Potentially relevant question: if you are connecting to an intranet page, does it use a valid certificate for outside-of-local usage or self signed or anything in between? The node could maybe struggle because of that too.

---

<div class="post-metadata">

**Author:** ![menno](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@menno](https://discourse.nodered.org/u/menno)\
**Post date:** [1 September 2019 12:02 UTC](https://discourse.nodered.org/t/problem-accessing-external-website/14905/5 "2019-09-01T12:02:14Z")

</div>

ok i swtched everything back to orginal state , but still this URL does not work  
[http://myuser:mypassword@192.168.1.214/ws2/Reports/bad.htm](http://myuser:mypassword@192.168.1.214/ws2/Reports/bad.htm)  
If i put this URL in my google browser IE or Edge **it works**

i use a HTTP-Request node and a debug nog to see the output  
still unauthorized ....  
if i use the basic or digest authentication it also still does not work.

what i am doing wrong here ???  
thanks in advance  
m

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 September 2019 07:23 UTC](https://discourse.nodered.org/t/problem-accessing-external-website/14905/6 "2019-09-02T07:23:01Z")

</div>

I think that the page(s) in question are trying to have a security handshake that is not being captured. This could be as simple as it needing to set a cookie dynamically.

Without knowing what server is providing the Intranet, it is hard to know what it will be doing.

Can you try it using wget from a command line?

---

<div class="post-metadata">

**Author:** ![menno](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@menno](https://discourse.nodered.org/u/menno)\
**Post date:** [5 September 2019 10:54 UTC](https://discourse.nodered.org/t/problem-accessing-external-website/14905/7 "2019-09-05T10:54:09Z")

</div>

thx guys ,  
i opened up the httpS to http because its an internal website.  
This works.  
I will leave it like this  
thanks for all the ideas and help  
m
