[GH-ISSUE #433] Integrate a HTTP REST API to play Playlists #1172

Closed
opened 2026-03-14 13:48:06 +03:00 by kerem · 5 comments
Owner

Originally created by @mrfatboy on GitHub (Apr 25, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/433

I just found and installed this repo. I got it working. This project looks promising.

Are there any plans to integrate an http rest api to control spotify? I am specifically looking for a REST API that I can play spotify playlists. My use case is having a dedicated host (macmin, Rpi, etc) running this app outputting the audio to my receiver. I would like to use home automation (ie Siri, Homekit),etc to control this app via REST api.

I would like to hear your thoughts on the subject and if you have any questions.

I looked at mopidy but it looks like it ended spotify support in March 2022.

Thank you

Originally created by @mrfatboy on GitHub (Apr 25, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/433 I just found and installed this repo. I got it working. This project looks promising. Are there any plans to integrate an http rest api to control spotify? I am specifically looking for a REST API that I can play spotify playlists. My use case is having a dedicated host (macmin, Rpi, etc) running this app outputting the audio to my receiver. I would like to use home automation (ie Siri, Homekit),etc to control this app via REST api. I would like to hear your thoughts on the subject and if you have any questions. I looked at mopidy but it looks like it ended spotify support in March 2022. Thank you
kerem 2026-03-14 13:48:06 +03:00
Author
Owner

@aome510 commented on GitHub (Apr 26, 2024):

Are there any plans to integrate an http rest api to control spotify? I am specifically looking for a REST API that I can play spotify playlists. My use case is having a dedicated host (macmin, Rpi, etc) running this app outputting the audio to my receiver. I would like to use home automation (ie Siri, Homekit),etc to control this app via REST api.

spotify_player provides CLI commands to interact with a running application and control spotify. You can build a REST API server or whatever using provided CLI commands as the baseline. It will also be easier to do it that way as you have more control over the API architecture.

I see no point of implementing a HTTP server inside the application while there exists CLI with the same functionalities.

<!-- gh-comment-id:2078557612 --> @aome510 commented on GitHub (Apr 26, 2024): > Are there any plans to integrate an http rest api to control spotify? I am specifically looking for a REST API that I can play spotify playlists. My use case is having a dedicated host (macmin, Rpi, etc) running this app outputting the audio to my receiver. I would like to use home automation (ie Siri, Homekit),etc to control this app via REST api. `spotify_player` provides [CLI commands](https://github.com/aome510/spotify-player?tab=readme-ov-file#cli-commands) to interact with a running application and control spotify. You can build a REST API server or whatever using provided CLI commands as the baseline. It will also be easier to do it that way as you have more control over the API architecture. I see no point of implementing a HTTP server inside the application while there exists CLI with the same functionalities.
Author
Owner

@mrfatboy commented on GitHub (Apr 26, 2024):

Is there a way to play a specific playlist on Spotify, either from a personal list or a premade Spotify playlist via a cli command? How?

<!-- gh-comment-id:2078606706 --> @mrfatboy commented on GitHub (Apr 26, 2024): Is there a way to play a specific playlist on Spotify, either from a personal list or a premade Spotify playlist via a cli command? How?
Author
Owner

@aome510 commented on GitHub (Apr 26, 2024):

> spotify_player playback start context -h
Start a context playback

Usage: spotify_player playback start context [OPTIONS] <--id <id>|--name <name>> <context_type>

Arguments:
  <context_type>  [possible values: playlist, album, artist]

Options:
  -s, --shuffle      Shuffle tracks within the launched playback
  -i, --id <id>
  -n, --name <name>
  -h, --help         Print help

So spotify_player playback start context playlist --name ...

<!-- gh-comment-id:2079364249 --> @aome510 commented on GitHub (Apr 26, 2024): ``` > spotify_player playback start context -h Start a context playback Usage: spotify_player playback start context [OPTIONS] <--id <id>|--name <name>> <context_type> Arguments: <context_type> [possible values: playlist, album, artist] Options: -s, --shuffle Shuffle tracks within the launched playback -i, --id <id> -n, --name <name> -h, --help Print help ``` So `spotify_player playback start context playlist --name ...`
Author
Owner

@mrfatboy commented on GitHub (Apr 26, 2024):

Thanks. I got it working. I have your app running on a mac mini. Spotify Conntect to a Chromecast connected to my receiver. The next step is to use Homebridge with a cli plugin to setup up several preset playlists. This whole system will by tied into Homekit so I will be able to say "Hey Siri, ". It will then turn on my receiver and issue the cli command. I think this will work. Im lucky to have the cli plugin. :)

<!-- gh-comment-id:2080086302 --> @mrfatboy commented on GitHub (Apr 26, 2024): Thanks. I got it working. I have your app running on a mac mini. Spotify Conntect to a Chromecast connected to my receiver. The next step is to use Homebridge with a cli plugin to setup up several preset playlists. This whole system will by tied into Homekit so I will be able to say "Hey Siri, <playlist>". It will then turn on my receiver and issue the cli command. I think this will work. Im lucky to have the cli plugin. :)
Author
Owner

@aome510 commented on GitHub (Apr 26, 2024):

Thanks. I got it working. I have your app running on a mac mini. Spotify Conntect to a Chromecast connected to my receiver. The next step is to use Homebridge with a cli plugin to setup up several preset playlists. This whole system will by tied into Homekit so I will be able to say "Hey Siri, ". It will then turn on my receiver and issue the cli command. I think this will work. Im lucky to have the cli plugin. :)

Nice. It sounds like a really fun home project! I'll close this issue for now. Feel free to reopen if you encounter any other issues or have other questions.

<!-- gh-comment-id:2080096005 --> @aome510 commented on GitHub (Apr 26, 2024): > Thanks. I got it working. I have your app running on a mac mini. Spotify Conntect to a Chromecast connected to my receiver. The next step is to use Homebridge with a cli plugin to setup up several preset playlists. This whole system will by tied into Homekit so I will be able to say "Hey Siri, ". It will then turn on my receiver and issue the cli command. I think this will work. Im lucky to have the cli plugin. :) Nice. It sounds like a really fun home project! I'll close this issue for now. Feel free to reopen if you encounter any other issues or have other questions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1172
No description provided.