Fix Spotify API February 2026 breaking changes#282
Fix Spotify API February 2026 breaking changes#282peanutlasko wants to merge 1 commit intobambanah:mainfrom
Conversation
- Fix playlist regex to match alphanumeric Spotify IDs (was digits-only) - Add null checks for tracks field in playlist responses - Add fallback to getPlaylistItems() when tracks is null - Implement OAuth Authorization Code flow with direct HTTP bypass - Add Spotify login/logout/callback API routes - Update SettingsPage UI for Spotify OAuth connection - Add .gitignore entry for local memory-bank directory
|
|
I successfully logged in but now I get this error when trying to download a playlist deemix-webui:dev: [error] Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...). Unfortunately, re-authenticating the user won't help here. Body: {"error": {"status": 403, "message": "Forbidden" } } |
|
@izldr you need to make sure you've created a spotify developer account and setup your key/secret. Then copy/paste the key and secret into Deemix. |
|
hey man! thanks for responding so quickly. I actually do have a spotify premium account because I happen to work for starbucks. Does it have to be a seperate developer account too? I created the app with my regular premium one and then added the email under user management, and I have the correct port setup with api/spotifyCallback as well. I'll try making a developer account |
|
you log in with the same account, but you have to run through a couple of steps to register as a developer. Then you make an application and you'll be provided a key/secret. Plug those into Deemix and it should work. (keep in mind you have to be using my fork, as the main Deemix repo is still pending the fix PR). |
|
i have been using your fork and I believe my account is a developer one because you can't access the developer page without being one or create an app. I did put the client id and secret in but it gives me the error that my spotify username isnt valid and that 403 error before. This is despite being connected to spotify through the web portal to the dev server on port 6959. Let me know if there's anything I can test |
|
Make sure you have the RedirectURI in spotify dev portal setup as : https://yourdeemixurl/api/spotifyCallback I believe Spotify requires https so you'll have to use a reverse proxy or some other way to have https certs. Also in Deemix, you need to have the username as it appears on spotify profile. So go to spotify.com in the browser, then click the icon in the top right > choose profile > https://open.spotify.com/user/your-user ID-here After you get those inputted (Dev portal shows correct URI and deemix has correct username), then reboot your Deemix instance and it SHOULD work. Mine has been working well but I was getting the "username not valid" until I rebooted my deemix. I also diconnected/reconnected my spotify using the auth button in Deemix after getting everthing else sorted. |
|
Oh for sure man thanks! I'm not home right now but I will check it out. I did some digging on the rules and I know I have the callback set up correctly. Spotify got rid of localhost and they require https unless you use http://127.0.0.1:6595/api/spotifyCallback It's probably the username thing that is messing me up. Haven't gotten the correct user id string but I'll check the url. How did you know what to fix for the api? Just looking at the documentation? Thanks btw |
|
Don't mean to spam or nothing I just really want your fork to work for me. I don't know if my account is just old or something but for some reason my profile shows up as user/username. I don't have any user id that I can find it's just a plain text string. Any tips on how I can find the real user id? I'ma go dig around. thanks bro |
|
I made a whole new account and added its email to user management but now I just get that huge user id string is "invalid" and
|

Fix Spotify API February 2026 Breaking Changes
Context
Spotify's February 2026 API changes introduced several breaking issues for apps in Development Mode:
tracksfield can be null in playlist responsesGET /users/{id}andGET /users/{id}/playlistsendpoints removed37i9dQZF1DXcBWIGoYBM5M)Changes
Playlist regex fix (
spotify.tsparseLink()): Changed\\d+to.+to match alphanumeric Spotify IDs.Null
trackshandling (spotify.ts_convertPlaylistStructure()andgeneratePlaylistItem()): Added null checks and optional chaining ontracks?.total/tracks?.href. Whentracksis null, falls back to fetching viagetPlaylistItems()API directly.OAuth Authorization Code flow (
spotify.tsspotifyApiGet()): Direct HTTP bypass for cases where SDKwithAccessToken()returns 403 with new Development Mode keys.New API routes:
GET /api/spotifyLogin— Initiates OAuth flow, redirects to Spotify authorization pageGET /api/spotifyCallback— Handles OAuth callback, exchanges code for tokensPOST /api/spotifyLogout— Clears stored OAuth tokensSettings UI (
SettingsPage.vue): Added Spotify OAuth connection section showing connection status and login/logout button.Testing
Tested with Spotify playlists, tracks, and albums using new Development Mode API keys (February 2026). All URL types successfully download after applying these fixes.
Notes
external_idsremoval (ISRC/UPC) was already handled by the existing null check ingetTrack()— no change needed there.GET /users/{id}/playlistsremoval affects the sidebar refresh button but does not affect downloading via pasted URL (the primary use case).