Spotify API returns 502 error when supplying snapshot_id
Closed this issue · 1 comments
When trying to delete track(s) using the deletePlaylistTracks() and supplying a $snapshot_id the Spotify API returns a 502 with "Error while loading resource" or "Invalid base62"
Looking at the documentation, it seems like they removed the support for supplying "snapshot_id" in the request.
https://developer.spotify.com/documentation/web-api/reference/remove-tracks-playlist
using deletePlaylistTracks() without a snapshot_id does work.
BTW same issue for reorderUserPlaylistTracks()
Hey!
Are you passing the tracks to delete as positions or tracks? I.e.
$api->deletePlaylistTracks('playlist_id', ['positions' => [0, 1], 'snapshot_id');
// or
$api->deletePlaylistTracks('playlist_id', ['tracks' => ['uri' => 'track_uri']], 'snapshot_id');There's been issues in the past with using the positions key (which seems to have been removed from the API). But looking at Spotify's documentation on deleting playlist tracks and reordering playlist tracks the snapshot_id parameter is still listed.
I don't know if you've seen this Spotify forum thread but it seems to be a common issue unfortunately.