In domoticz, I created a virtual switch, and set on action to trigger another virtual switch to turn on using json. Something like: http://192.168.1.2:8080/json.htm?type=c ... &svalue=79.
After I added username and password, this url is of course not working anymore.
Following the instructions in https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s, I tried:
- http://<user:pwd>@hostname
- http://domoticz-ip<:port>/json.htm?username=<encrypted username>&password=<encrypted pwd>&api-call
But both of the methods give me a 401 unauthorized error.
Somebody could help here?
json url with username and password Topic is solved
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: json url with username and password
Below call works for meRebecca wrote: ↑Wednesday 16 September 2020 17:26 I tried:
- http://<user:pwd>@hostname
- http://domoticz-ip<:port>/json.htm?username=<encrypted username>&password=<encrypted pwd>&api-call
But both of the methods give me a 401 unauthorized error.
Code: Select all
http://waaren:[email protected]:8084/json.htm?type=command¶m=getversion
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 4
- Joined: Wednesday 16 September 2020 17:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: json url with username and password
Thanks Waaren. I tried the same, doesn't work for me. Also tried it in different browsers
.

- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: json url with username and password
How did you configure your website protection? Mine is
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 4
- Joined: Wednesday 16 September 2020 17:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: json url with username and password
I configure the website protection the same as yours.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: json url with username and password
And does this user have admin rights?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 2
- Joined: Friday 20 May 2022 23:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: json url with username and password
I have the same issue, tried both auth types... with and without admin rights on the user....
My local access works... my access using the same URL's from my phone (not on my wifi) works fine....
using the same auth either from ifttt or friends in another country does not work... 401 error
Not too sure what else to try - it used to work before (granted a long time ago - and I am only looking at it now)
So something must have changed in how domoticz handles these json url's, or its security then?
My local access works... my access using the same URL's from my phone (not on my wifi) works fine....
using the same auth either from ifttt or friends in another country does not work... 401 error
Not too sure what else to try - it used to work before (granted a long time ago - and I am only looking at it now)
So something must have changed in how domoticz handles these json url's, or its security then?
Who is online
Users browsing this forum: No registered users and 1 guest