Starting Spotify session via HTTP call

dhess83

New member
Joined
Nov 30, 2024
Messages
4
Hi all,

I'm doing some stuff with Wiim via HTTP calls to the device directly, such as adding and removing sub-devices, controlling playback (previous, play\pause, next, etc).

However, the one thing I -can't- figure out how to do is to start a new spotify session from the device. It seems the only way I can do it is from a spotify client itself. I feel like I'm knocking on the door here, with this command:

Code:
https://10.10.10.254/httpapi.asp?command=setPlayerCmd:play:url
but I can't figure out how to make this work, specifically for Spotify. I'd like to make it work with any of my playlists-- doesn't matter which, as long as it's Spotify. Can anybody offer suggestions here?
 
Have you tried Spotify’s API? I haven’t used it in years, so don’t remember if it offers playback on specific devices.
 
Have you tried Spotify’s API? I haven’t used it in years, so don’t remember if it offers playback on specific devices.
I'm also using this Python-based control for spotify that uses its API:


It also lets me play, pause, resume... even search for tracks or playlists, but only if the Spotify session is already started. If no active session is present, it doesn't do anything. So, I'm in the same boat with this one.

I'm probably missing something simple, I just can't figure out how to do it.
 
I don't have a premium Spotify sub (though I still have a working developer login), but this looks like it ought to work:


I get this response without a premium sub, as expected:

JSON:
{
  "error": {
    "status": 403,
    "message": "Player command failed: Premium required",
    "reason": "PREMIUM_REQUIRED"
  }
}
 
Back
Top