Page 1 of 1

json api no longer working in latest Beta

Posted: Saturday 04 February 2023 19:29
by stephanvdplas
I tried to change a setting via the json api, but since a couple of days it doesn't work on my beta environment.
I suspect it having to do with the latest changes of the authentication. But I am unable to troubleshoot at this moment.

When I run

Code: Select all

https://user:password@serverDNSname/json.htm?&type=command&param=udevice&idx=1919&nvalue=0&svalue=test
I receive
{
"status" : "ERR"
}

A wireshark serverside does show me a valid SSL handshake and some TLS 1.3 data, but it doesn''t help me in troubleshooting.

Can someone help me in troubleshooting this?

Regards,
Stephan van der Plas

json api no longer working in latest Beta

Posted: Sunday 05 February 2023 9:10
by kiddigital
If you run that from the browser (ie Chrome) than it does not work a the browser strips the u/p from the request (look at your Wireshark output the see the URL going out).

Try to run the command with curl for example. (Or ‘Invoke-WebRequest’ on Windows Powershell).

Run Domoticz with the debug flags ‘auth,webserver,received’ to see what info Domoticz receives and what the Auth check do.