API send Command to play song on mopidy

Greetings, I’m using mopidy on a vps with ubuntu, well i want to create an app with PHP using mpd.class.php, but I’m beginner with mopidy, how can I send a command for to play a song from soundcloud using API?

Sorry for my bad english.

Mopidy supports both mpd and a Web socket interface. Both of which are well documented so please take a look at that.

Oh I see, hmm I don’t understand this Tracklist controller: mopidy.tracklist.add

I want add a song from Soundcloud in the Queue with that command on Javascript.

I have this:


but doesn’t work

for add a video from Youtube I have this:


Raw JSON using curl:

curl -X POST -H Content-Type:application/json -d '{
  "method": "core.tracklist.add",
  "jsonrpc": "2.0",
  "params": {
    "uri": "yt:https://www.youtube.com/watch?v=1qMPcCXYKU0"
  "id": 1
}' http://localhost:6680/mopidy/rpc

or using js


See https://github.com/dz0ny/mopidy-api-explorer for more examples.