Simple API for controlling Spotify from other services.
A dead simple API for controlling Spotify from other services.
This tiny API is useful for integration into other services, e.g. openHAB if you are into home automation. The API can easily be integrated into openHAB using either the HTTP Binding or the Exec binding.
This simple API allows you to control Spotify running on an OS X machine using a simple API which you can communicate with using HTTP.
The following commands are supported:
Run the Node.js app using node app.js
. The API will be available on localhost:3000
.
You can issue the following requests. E.g. PUT localhost:3000/next
to skip to the next track.
HTTP Method | Resource |
---|---|
PUT | /play |
PUT | /pause |
PUT | /playpause |
PUT | /next |
PUT | /previous |
GET | /current |
The API is backed by an Apple Script which sends the commands to Spotify.