Skip to content

fix: migrate write endpoints to Spotify February 2026 API changes - #37

Open
dorneanu wants to merge 1 commit into
marcelmarais:mainfrom
dorneanu:fix/february-2026-api-migration
Open

fix: migrate write endpoints to Spotify February 2026 API changes#37
dorneanu wants to merge 1 commit into
marcelmarais:mainfrom
dorneanu:fix/february-2026-api-migration

Conversation

@dorneanu

@dorneanu dorneanu commented Mar 9, 2026

Copy link
Copy Markdown

Summary

Spotify's February 2026 Web API migration deprecated several endpoints that the SDK still calls internally. This PR replaces those SDK calls with direct fetch calls to the new API paths.

  • addTracksToPlaylist: POST /playlists/{id}/tracksPOST /playlists/{id}/items
  • removeTracksFromPlaylist: DELETE /playlists/{id}/tracksDELETE /playlists/{id}/items
  • reorderPlaylistItems: PUT /playlists/{id}/tracksPUT /playlists/{id}/items
  • createPlaylist: POST /users/{id}/playlistsPOST /me/playlists
  • saveOrRemoveAlbumForUser: PUT|DELETE /me/albumsPUT|DELETE /me/library

Test plan

  • addTracksToPlaylist adds a track to a user-owned playlist without 403
  • removeTracksFromPlaylist removes a track from a playlist
  • reorderPlaylistItems reorders tracks in a playlist
  • createPlaylist creates a new playlist for the current user
  • saveOrRemoveAlbumForUser saves/removes an album from the library

Replace SDK calls that map to deprecated endpoints with direct fetch calls
to the new API paths:

- addTracksToPlaylist: POST /playlists/{id}/tracks → /playlists/{id}/items
- removeTracksFromPlaylist: DELETE /playlists/{id}/tracks → /playlists/{id}/items
- reorderPlaylistItems: PUT /playlists/{id}/tracks → /playlists/{id}/items
- createPlaylist: POST /users/{id}/playlists → POST /me/playlists
- saveOrRemoveAlbumForUser: PUT|DELETE /me/albums → PUT|DELETE /me/library
@philipmikal

Copy link
Copy Markdown

This one is needed!

@dorneanu

Copy link
Copy Markdown
Author

Yeah, feel free. I quickly added the required changes after Claude figured out the endpoints have changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants