Z-Wave-Me/zwave-smarthome

API calls need to authenticate

Quax1507 opened this issue · 6 comments

In former versions I was able to place API calls without authentication like:

https://ip-of-zway:8083/ZAutomation/api/v1/devices/DummyDevice_95

Now I Need to authenticate via GUI before.
I use an iPhone app (Geofancy) which only can do HTTP basic authentication. Used that before with Nginx (reverse proxy).

I would like to have the possibility to disable GUI authentication or switch to HTTP basic authentication!

BTW: it makes no difference if checkbox "Allow public access to Z-Wave API" is set or not

Not yet, it is always public so far (will change soon).

But you are trying not Z-Wave API, but ZAutomation (HA) API. This one is restricted. You need to authenticate yourself or add Anonymous user and give rights to it.

You are right! I am using ZAutomation API.
But HOW can I grant access to anonymous user for this API only?

Please go in Settings->Admin and add user with anonymous role (in latest versions)

Does not work. I created anonymous user named "anonymous".

Opening
http://myip:8083/ZAutomation/api/v1/devices/DummyDevice_95

Error is now:
{"data":null,"code":404,"message":"404 Not Found","error":"Device DummyDevice_95 doesn't exist"}

When I first log in as admin in same browser (or other browser tab) it works!

Please move it into a room and give Anonymous user access to the room in users management tab