Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Hello.
It looks like the PUT playlists/{playlistid}/tracks endpoint (https://developer.spotify.com/documentation/web-api/reference/#/operations/reorder-or-replace-playli...) only lets you move a track if you know its position already, is that right?
If so, does that mean in order to move only knowing a URI, I have to get every track in the playlist (this will take a while my playlist has over 1k songs), find the track with the matching URI, then determine playlist position based on the track's position in the resulting array? Cause as far as I know the GET /playlists/{playlistid}/tracks endpoint doesn't let you filter by URI, and even if it did it doesn't tell you the position in playlist, so I would still need to get every track to determine position.
Thanks.
Solved! Go to Solution.
How about removing the track and readding it at your desired position?
https://developer.spotify.com/console/delete-playlist-tracks/
I have a followup-questin since I have a similar problem. How do you even add tracks to an existing playlist? It seems like I am overwriting my playlist instead of adding new tracks to an existing list.
I sadly cant make sense of how to structure these parameters:
range_start, insert_before, range_length
bump
How about removing the track and readding it at your desired position?
https://developer.spotify.com/console/delete-playlist-tracks/
I have a followup-questin since I have a similar problem. How do you even add tracks to an existing playlist? It seems like I am overwriting my playlist instead of adding new tracks to an existing list.
I sadly cant make sense of how to structure these parameters:
range_start, insert_before, range_length
Thanks for the idea, it ended up working. Who even knows if PUT playlists/{playlistid}/tracks would even work with URI, and who cares. This works. You said you were struggling with a similar problem, so here's a snippet of working code to move a URI to top of playlist:
Thanks man, I will try it out!
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game and get…