I am developing a windows application in .NET C# to snap picture on Amcrest camera. I've downloaded the HTTP API SDK at https://s3.amazonaws.com/amcrest-files/ ... 3.2017.pdf
Snippet of my code is below:
Code: Select all
private CredentialCache GetDigestCredential()
{
var uri = new Uri(cameraSetting.CameraUri);
var cache = new CredentialCache();
cache.Add(uri, "Digest", new NetworkCredential(cameraSetting.UserName, cameraSetting.Password));
return cache;
}
public async Task<byte[]> Snap()
{
using (var client = new WebClient())
{
client.Credentials = GetDigestCredential();
var uri = new Uri(String.Concat(cameraSetting.CameraUri, "/cgi-bin/snapshot.cgi?channel=1"));
return await client.DownloadDataTaskAsync(uri);
}
}
But it does not work with camera IP2M-846E. I get an error: HTTP 401 unauthorized.
Questions:
- Does anyone know the authentication model of IP2M-846E?
- Where can I download the HTTP API SDK for IP2M-846E?
Thanks.
Notes about my camera model IP2M-846E:
- Software Version 2.400.AC03.0.R.T4.484.9A.NR, build : 2017-03-17
- WEB Version 3.2.1.329959
- ONVIF Version 2.4.2
- PTZ Version 2.04.71.RHNVFJC