thrash.dev

docs / providers / spotify

Providers · chapters · 08 of 25

← Yafmp manual

  1. Local Files
  2. Plex
  3. Navidrome
  4. Jellyfin
  5. Bandcamp
  6. Lidarr
  7. Apple Music
  8. Spotify
  9. SoundCloud
  10. YouTube Music
  11. SiriusXM
  12. Radio
  13. Podcasts
  14. AirPlay
  15. Chromecast
  16. MusicBrainz
  17. Discogs
  18. Labels
  19. Releases
  20. Last.fm
  21. ListenBrainz
  22. Connect
  23. Home Assistant
  24. MCP server
  25. DJ

Spotify

Your Spotify library: playlists, saved albums and songs, followed artists, search. A Spotify player plays it and Yafmp is the remote.

facts

status
beta
kind
source
on by default
no
needs
Spotify Premium, Your own Spotify developer app (Client ID), A Spotify player to play on
platforms
iPhone, iPad, Mac, Vision Pro, Android, Android TV, Linux, FreeBSD, Windows

Description

Spotify lets no other app play its audio. So Yafmp does not play Spotify songs itself: it is a remote control for Spotify Connect. You browse and queue your Spotify library in Yafmp, and a Spotify player makes the sound. That player can be the Spotify app on the same device, the Spotify app on another device, or a Connect speaker.

Because the sound never passes through Yafmp, its equalizer, compressor, visualizers, AirPlay and Chromecast outputs do not apply to Spotify songs. Yafmp’s volume slider sets the Spotify player’s own volume.

The library shows Playlists, Albums, Liked Songs, Artists (the ones you follow) and Recently Played. Search covers artists, albums and tracks.

Spotify is off by default. It is not on Apple TV.

Requirements

  • Spotify Premium. Spotify only allows remote control with Premium.
  • Your own Spotify developer app. Yafmp ships without a Spotify app ID, so you make one and paste its Client ID. There is no client secret to enter.
  • A Spotify player that is on and signed in to the same account: the Spotify app, or a Connect speaker.
  • A web browser on the device you sign in on. The sign-in must finish on that same device.

Setup

  1. Go to developer.spotify.com/dashboard and make an app. Choose Web API when asked which API it uses.

  2. Add the redirect URI for your edition to the app, exactly as written:

    EditionRedirect URI
    Appleyafmp://spotify
    Androidyafmp://spotify
    Desktop (Linux, FreeBSD, Windows)http://127.0.0.1:43821/callback

    If you use more than one edition, add both.

  3. Copy the app’s Client ID.

  4. In Yafmp, open Preferences → Plugins → Spotify and switch on Enabled (Apple), or open Settings → Spotify and turn on the switch at the top (Android and desktop).

  5. Paste the Client ID into App ID (Client ID) and choose Sign In with Spotify.

  6. Sign in on Spotify’s page and agree. Apple shows the page in a sheet. Android and desktop open your browser; on the desktop the browser ends on a page that says you can close the tab.

  7. Open Spotify on the device you want to hear, then play something from the Spotify rows in Yafmp.

Settings

SettingDefaultWhat it does
EnabledoffApple: switches the plugin on. On Android and desktop this is the switch at the top of the Spotify pane.
App ID (Client ID)—The Client ID of your own Spotify developer app. Shown while signed out.
Sign In with Spotify—Opens Spotify’s sign-in page.
Signed in—The Spotify account’s display name. Read-only.
Play onWhichever Spotify player is activeThe Connect device that plays. The list shows the players Spotify reports as on. If the chosen one is off, Yafmp uses the active one, or else the first one listed.
Sign Out—Forgets the sign-in.
Show in the libraryall onAndroid and desktop: one checkbox per Spotify row.

The sign-in token is kept in the system keychain (Apple) or the app’s private storage (Android and desktop). On Apple the Spotify sign-in is per device; it is not shared between your devices.

Limits

  • The sound comes from the Spotify player, not from Yafmp. No equalizer, compressor, visualizers, AirPlay or Chromecast from Yafmp. To play on a speaker, pick a Connect speaker under Play on.
  • One track at a time is sent to the player, so there is a short gap between tracks and no gapless playback. Spotify’s Autoplay may start a song of its own for a moment before Yafmp’s next one takes over.
  • Spotify limits developer apps in Development Mode: search returns 10 results of each kind, and only playlists you own or collaborate on list their songs.
  • Artists shows up to 50 followed artists. Recently Played shows the last 50 songs. Other lists stop at 1,000 entries.
  • Local files you added to Spotify are skipped. They cannot be played over Connect.
  • The lists are loaded once and kept until you restart Yafmp.
  • There is no QR code sign-in. The redirect has to arrive on the device that started the sign-in.

Troubleshooting

ProblemWhyWhat to do
“No Spotify player is on”Spotify reports no player for your accountOpen the Spotify app on this device or another one, then press play again.
The Spotify app on an iPad is not foundThe app only lists itself as a player while it is in frontPlay on another device or a Connect speaker, and pick it under Play on.
“Spotify refused (Premium needed?)”The account is not Premium, or Spotify does not allow the requestCheck that the account you signed in with has Premium.
“Spotify only lists the songs of your own playlists to apps like this one”A Development Mode limit on playlists you only followCopy the songs into a playlist of your own in Spotify.
Sign-in fails with a redirect error on Spotify’s pageThe redirect URI in your Spotify app does not match this editionAdd the URI from the table in Setup, exactly as written.
“Can’t wait for the sign-in” (desktop)Yafmp could not listen on port 43821 for the answerClose the program that uses the port, then sign in again.
Yafmp signed out by itselfSpotify rejected the stored sign-in, for example after the Client ID changedSign in again.
“Spotify is busy”Spotify’s rate limitWait a little and try again.