This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Reolink Cam help
#1
I'm trying to obtain the token of my cam, but I'm not success.

This is the help that I've found..

I'm not able to build the POST sentence with username payload.

to get your token for the URL above, you need to post here:
http://192.168.AAA.BBB/cgi-bin/api.cgi?cmd=Login&token=null

with this payload (substituted in your username and password)
[{"cmd":"Login","action":0,"param":{"User":{"userName":"admin","password":"abcdefg"}}}]

the response that comes back has the token in the name field
[
{
"cmd" : "Login",
"code" : 0,
"value" : {
"Token" : {
"leaseTime" : 3600,
"name" : "75a35d0a5a30680"
}
}
}
]





Does anyone can help me?
Reply
#2
Try this:
Code:
http = require('socket.http')
url = 'http://192.168.AAA.BBB/cgi-bin/api.cgi?cmd=Login&token=null'
data = '[{"cmd":"Login","action":0,"param":{"User":{"userName":"admin","password":"abcdefg"}}}]'
res, err = http.request(url, data)
log(res, err)
Reply
#3
Perfect!!!

thx

Reolink test 29.09.2020 14:26:04
* arg: 1
* string: [
{
"cmd" : "Login",
"code" : 0,
"value" : {
"Token" : {
"leaseTime" : 3600,
"name" : "cajksdhfk js6d58"
}
}
}
]

* arg: 2
* number: 200
Reply


Forum Jump: