Blindify is a personal project using Next.js (App Router) + Express + Spotify Web API to generate blind-test games from a user’s Spotify library. Flow: user logs in with OAuth, backend fetches playable tracks (preview_url required) from their library, and starts a quiz session. For many accounts the flow works: getMySavedTracks → filter preview_url → game starts. For a subset of users, even ones with thousands of liked songs, the API consistently returns zero usable tracks or errors (404, sometimes 401). Same behavior locally and in production. Tokens are valid, accounts correctly stored, session/state valid. Users added as testers in Spotify Dashboard. Re-auth does not change results.
Backend fallback pipeline attempts to ensure something playable is always returned: liked tracks → top tracks → recently played → playlists → recommendations → search. On problematic accounts, all of these return empty lists or tracks with no preview_url. Only static fallback audio works, which defeats the point of using the user’s library. Pattern observed: some accounts (often non-EU?) reliably break, even though they have large libraries. Others (including mine) always work. Looks like preview availability is inconsistent by region/account rights.
Questions:
• Is this a documented Spotify limitation related to market/license/preview rights?
• Are preview URLs effectively deprecated for certain territories?
• Any known workaround to ensure playable preview segments for every user? (market header? locale? different endpoints?)
• If previews are not reliable anymore across regions, what is the recommended design to build user-library music quizzes without violating terms?
Looking for clarification from anyone who has built music-guess apps on Spotify recently and encountered inconsistent preview_url availability across accounts and regions.
https://github.com/tymmerc/blindify.git