Capture picture with Reolink RLC-820A api

Viewed 271

according to https://support.reolink.com/hc/en-us/articles/360007011233-How-to-Capture-Live-JPEG-Image-of-Reolink-Cameras-via-Web-Browsers it should be pretty straight forward to capture a picture by the webcam's api.

http://192.168.2.119/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=admin&password=123456

but when I try this, I'm always getting a 'please login first' error.

[
   {
      "cmd" : "Snap",
      "code" : 1,
      "error" : {
         "detail" : "please login first",
         "rspCode" : -6
      }
   }
]

So I did some more reverse engineering and was able to make the Login endpoint working.

curl -s -d '[{"cmd":"Login","action":0,"param":{"rs": "abcd", "User":{"userName":"admin","password":"abcd"}}}]' $HOST/api.cgi?cmd=Login

this returns a JSON with the new token.

but now I'm stuck again. When making a call with the token ...

curl --output snapshot.jpg $HOST/cgi-bin/api.cgi?cmd=Snap&channel=0&token=$TOKEN

I'm getting again the mentioned "please login first" error message.

Reolink support just gave me the link to their official documentation which seems somehow not to work with this webcam model.

Did anyone manage to get this working?

0 Answers
Related