riker1
24 September 2018 09:00
1
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!
riker1
24 September 2018 09:26
3
riker1
24 September 2018 10:15
5
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
riker1
24 September 2018 13:51
7
Hi, just a maybe dumm question.
Is osmc a valid jsonrpc-user ?
Did you configure it as the user/password?
riker1
25 September 2018 05:09
9
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
riker1
28 September 2018 10:31
11
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