SOLVED 2.0.2. Unauthorized","error":"Not logged in"

Discussions about RaZberry - Z-Wave board for Raspberry computer
fableman
Posts: 62
Joined: 01 Mar 2015 13:16

Re: SOLVED 2.0.2. Unauthorized","error":"Not logged in"

Post by fableman »

aivs wrote:To login with curl use this command, it saves cookie to file "cookie.txt" :

Code: Select all

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"form":true,"login":"admin","password":"admin","keepme":false,"default_ui":1}' http://192.168.0.62:8083/ZAutomation/api/v1/login -c cookie.txt
Now you control devices with command:

Code: Select all

curl http://192.168.0.62:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_6-0-37/command/on -b cookie.txt
Be sure to use cookies.
Aivs that's a great solution. Thanks alot.

Will this stop working in the future and need cookie and login?
curl -s -LN --globoff 'http://10.10.10.80:8083/ZWaveAPI/Run/de ... 37].Set(0)'

AlphaX2
Posts: 110
Joined: 25 Jul 2015 15:03

Re: SOLVED 2.0.2. Unauthorized","error":"Not logged in"

Post by AlphaX2 »

Hi,

Is there any kind of an offical documentation? Because I wanted to use it with Python and was not able to get something to work, because the offical Dev PDF file is missing this information - how to login - as well.

AlphaX2

User avatar
PoltoS
Posts: 5525
Joined: 26 Jan 2011 19:36

Re: SOLVED 2.0.2. Unauthorized","error":"Not logged in"

Post by PoltoS »

The curl example was added in FAQ on the site. We are updating the manual to include authentication.

AlphaX2
Posts: 110
Joined: 25 Jul 2015 15:03

Re: SOLVED 2.0.2. Unauthorized","error":"Not logged in"

Post by AlphaX2 »

Would be cool to see the apiary.io documentation updated as well. Could help a lot. For the moment the Anonymus solution is good enough, but also took some search to find the hint, how to do that. ;)

Thank you anyway.

Post Reply