# Downloading image from webpage

**URL:** <https://discourse.nodered.org/t/downloading-image-from-webpage/84198>\
**Category:** General\
**Created:** [2 January 2024 08:40 UTC](https://discourse.nodered.org/t/downloading-image-from-webpage/84198 "2024-01-02T08:40:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [2 January 2024 08:40 UTC](https://discourse.nodered.org/t/downloading-image-from-webpage/84198/1 "2024-01-02T08:40:38Z")

</div>

Hello

I have some cameras setup which have a snapshot URL. The URL basically takes a snapshot of the camera image once executed.

The address for the snapshot is: [http://mycamip/cgi-bin/snapsoht.cgi?channel=1](http://mycamip/cgi-bin/snapsoht.cgi?channel=1)

I have tried a http request node with method = GET and return set to a binary buffer. I get a response in the msg object but msg.payload is empty. Is there any way to download the image from the webpage?

---

<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:** [2 January 2024 08:53 UTC](https://discourse.nodered.org/t/downloading-image-from-webpage/84198/2 "2024-01-02T08:53:12Z")

</div>

Did the camera need a login?

What headers do you see in the network tab of the browser devtools when you access the snapshot URL in a browser?

---

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [2 January 2024 09:06 UTC](https://discourse.nodered.org/t/downloading-image-from-webpage/84198/3 "2024-01-02T09:06:09Z")

</div>

Thanks for the reply.

The camera does need a login, I included that in the http request node.

In the network tab, headers are General / response and request headers.

Not sure what I should be looking for here :\

---

<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:** [2 January 2024 09:15 UTC](https://discourse.nodered.org/t/downloading-image-from-webpage/84198/4 "2024-01-02T09:15:04Z")

</div>

> [@Sirhc](#):
>
> In the network tab, headers are General / response and request headers

Try adding the same request headers to your request

---

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [2 January 2024 09:15 UTC](https://discourse.nodered.org/t/downloading-image-from-webpage/84198/5 "2024-01-02T09:15:25Z")

</div>

Bleh I got it, had to use the digest authentication instead of using the username:password in the camera URL

---

<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:** [2 January 2024 09:15 UTC](https://discourse.nodered.org/t/downloading-image-from-webpage/84198/6 "2024-01-02T09:15:40Z")

</div>

> [@Sirhc](#):
>
> The camera does need a login, I included that in the http request node.

How? Show us.

Also, what is the name and model of this camera?

---

<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:** [2 January 2024 09:16 UTC](https://discourse.nodered.org/t/downloading-image-from-webpage/84198/7 "2024-01-02T09:16:59Z")

</div>

> [@Sirhc](#):
>
> digest authentication

Yup, that is where I was leading you to with the last question (we posted at the same time)

Glad it is resolved.

---

<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:** [16 January 2024 09:17 UTC](https://discourse.nodered.org/t/downloading-image-from-webpage/84198/8 "2024-01-16T09:17:42Z")

</div>

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