Reputation: 21
I am building a new home, and have been working for a long time on my own home automation system (java) controlling everything. It was on hold as I had to build the actual house, but now I am back to the automation system. I have a need to control the desktop player (windows) with basic play and pause functionality, as well as querying status and what is playing.
Before the break in the project, this was working using the local http server built-in to the application. This, it seems, is no longer supported. From what I can gather, everything is moved to the Web API and Spotify connect. Reading quickly through it, however, it seems I have to use the "streaming" permission to control the player, but this is only implemented in the native iOS and android SDK.
Can anyone confirm this before I waste too much time implementing this? Any suggestions on how to control and query the local player?
Upvotes: 2
Views: 4080
Reputation: 1275
You're correct, the Spotify Connect Web API is what you're looking for. All the documentation is here: https://beta.developer.spotify.com/documentation/web-api/reference/player/
To control Spotify Connect you do not need the streaming scope. To play, pause, skip, etc., you need the user-modify-playback-state
, and to get information about the state or currently playing track, you user-read-playback-state
.
Here's a guide on working with the Connect API: https://beta.developer.spotify.com/documentation/web-api/guides/using-connect-web-api/
Hope that helps - happy hacking!
Upvotes: 2