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.

Control Camera Notification Status
#3
Thank you for your reply.
I tried this but it didn't work because as I saw in the API documentation, you have first to login to the synology like this:

GET /webapi/auth.cgi?

api=SYNO.API.Auth&method=Login&version=2&account=USERNAME&passwd=PASSWORD&session=SurveillanceStation&format=sid

or in LUA according to your example, it will be something like this:


Code:
data = socket.http.request('http://1.2.3.4/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=2&
account=USERNAME&passwd=PASSWORD&session=SurveillanceStation&format=sid')

Then you have to get the sid that will be returned as a response to the above request (GET) command and use it to all other calls you made like this:
Code:
data = socket.http.request('http://1.2.3.4/webapi/entry.cgi?mailEnable=1_sid=Jn5dZ9aS95wh2')

Now in order to insert in the string above the sid response that I would have previously get as data, should I try something like this?:

local request_body = "http://1.2.3.4/webapi/entry.cgi?mailEnable=1_sid=".. data
and then send this?:

data = socket.http.request(request_body)

??
Reply


Messages In This Thread
RE: Control Camera Notification Status - by jetsetter - 31.08.2015, 13:21

Forum Jump: