Json bad client permission

Hi
how can I solve a bad client permission error sending JSON

I assume all options are set to on in OSMC

  • allow remote
  • webservice
    -anything forgotten?

thanks

http://osmc:<password>@192.168.0.134:8080/jsonrpc?request={“jsonrpc”:“2.0”,“id”:1,“method”:“Application.SetMute”}

gives:
{
“error”: {
“code”: -32099,
“message”: “Bad client permission.”
},
“id”: 1,
“jsonrpc”: “2.0”
}

You are missing the password!

Hi
i am running.

v18 Leia

sorry: i did it with password. just deleted it for pasting

http://osmc:<mypassword>@192.168.0.134:8080/jsonrpc?request={“jsonrpc”:“2.0”,“id”:1,“method”:“Application.SetMute”}

1 Like

Hi Tom,

looks like this is not implemented to do HTTP Get

how would the mute work with curl?

curl --data-binary ’ {“jsonrpc”:“2.0”, “method”:“Application.SetMute”, “id”: 1}’ -H ‘content-type: application/json;’ http://osmc:mypassword@192.168.0.134:8080/jsonrpc ??

Hi,

Other users will be able to advise better, as I do not run osmc headless and I’ve had no reason to use json. I was just aware there was an issue with json in kodi 18. But a search of the discourse provided a few examples which should get you going:

https://discourse.osmc.tv/search?q=json%20curl

Thanks Tom.

1 Like

Hi, just a maybe dumm question.

Is osmc a valid jsonrpc-user ?

Did you configure it as the user/password?

Not sure, where do I have to configure it ?
I only allow http and remote control via osmc

On the screen where you enable the web server and configure the port

Hi Fzinken,
I did not populate the user and password, so I assume default osmc is a valid user for jsonrpoc, right?

If you don’t populate it no user/password will be configured