Correct format to start playlist from Chorus 2 web interface
#1
I used to remotely start playlists in Kodi 16 (with default web interface) as follows:

Code:
http://192.168.1.2:80/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"special://profile/playlists/music/jazz.m3u"}}}

Now I installed Kodi 18 with web interface Chorus 2. When I run above code I receive following error in my browser:
{"error":{"code":-32099,"message":"Bad client permission."},"id":"1","jsonrpc":"2.0"}

I have tried using below code but I keep getting the above error. Can someone please advise what it is that I am doing wrong?
Code:
http://192.168.1.2:80/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"#browser/music/special://profile/playlists/music/jazz.m3u"}}}

If this is not the right subforum, I apologize.

Your help is much appreciated!
Reply
#2
90% of JSON requests as GET are now forbidden Smile Major change, very little communication Sad

You need to use POST (Won't be easy most of the time).

https://github.com/xbmc/xbmc/pull/12281
Reply
#3
(2017-07-19, 20:06)Tolriq Wrote: 90% of JSON requests as GET are now forbidden Smile Major change, very little communication Sad

You need to use POST (Won't be easy most of the time).

https://github.com/xbmc/xbmc/pull/12281

Thank you very much for your clarification!

I have searched for JSON POST commands to be used in a browser, but I have not been able to find anything useful.
Could someone please give an example of a POST command that I could use in a browser to play a file on Kodi?
Reply
#4
Postman is the best: https://chrome.google.com/webstore/detai...bncdddomop Smile

But integration in any basic tool won't be possible, POST is a specific thing and can't be done via just an URL.

https://github.com/xbmc/xbmc/pull/12265 was the source of the cause of this PR. It seems that fixing possible CSRF on non password protected Kodi was more important than fixing access to whole computer Smile

https://github.com/xbmc/xbmc/pull/1506 for history, many will miss that.
Reply
#5
Thanks again!
I used the GET method for starting radio streams on Kodi directly from a widget on my iPhone. I did this with a 'Player.Open' command in a URL.
Doing this via a Kodi remote control app requires a lot more clicking...
Reply
#6
Well I guess someone will create a widget that can do post Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Correct format to start playlist from Chorus 2 web interface0