Page 2 of 2

Re: Dahua Ip camera snapshot url

Posted: Wednesday 04 July 2018 9:52
by lukaskupasz
Hello,
I have Dahua camara model DH-IPC-HFW1320SN-W-0280B.

My problem is when I try to get an snapshot in C# application,
using URL:

because I get the 401 error (Unauthorized).

I already try with this ways:
http://username:[email protected]/ ... shot.cgi?1
http://username:[email protected]/ ... shot.cgi?0
http://xxx:[email protected]/cgi-bin/sn ... ginpas=xxx

When I try in firefox with user and pass included in the URL, the camera still ask for user and pass. I think this maybe can be the error in C# application.

I need the URL including user and pass thats works

Thanks in advance

Re: Dahua Ip camera snapshot url

Posted: Wednesday 04 July 2018 15:11
by Rainman
In C# I think you have to figure out how to pass 'digest' authentication.

In bash I use this on some of the newer camera's to get a snapshot;

Code: Select all

curl --user "user:pass" "http://192.168.1.108/cgi-bin/snapshot.cgi?1" --digest -o "\var\tmp\snapshot.jpg" -s
Maybe this helps;
https://stackoverflow.com/questions/30 ... arameters