API call light.turn_off failes (401) but turn_on works

Hey guys,
I need an idea what 'm doing wrong, or if I have found a bug.

I use homeassistant via docker (actual version 0.84.3). Since 3 or 5 versions I have a strange phenomenon. In former versions it worked and stopped a time ago:

When I call the API ( I use it in IFTTT, but to get one complexity away I made some curl commands):
curl -X POST -H "Content-Type: application/json" -d '{"entity_id": "light.kitchen"}' https://[FQDN]:[PORT]/api/services/light/turn_on?api_password=[API_PASSWORD]

It works, the light is on. But when I do the same call with turn_off or with toggle I get an error 401 (not authorized) and the light stay’s on.

Now the fun part: When I do the turn_off-call from a trusted network and I don’t add the api_password, the call works. Even when I add the password - but misspelled! - it works. When I add the correct password, the call fails.

Nevermind, I solved the issue with avoiding the API password and using https://[Domain]:[Port]/api/webhook/[APIKEY] syntax (check it out) and all the information stored in the json string, not partially in the URL and in the json. That solved the problem :slight_smile: