I’m working on a party application where multiple people can request music that gets added to a Spotify playlist queue. I know that the Spotify Web API has player control features that let you start playback of specific tracks.
I’ve been exploring the player endpoints and can successfully trigger immediate playback, but I’m struggling to figure out how to add requested songs to the queue instead of playing them right away.
The goal is to have guests submit song requests through my app, and these requests should be queued up in Spotify rather than interrupting the currently playing track. Has anyone worked with similar functionality using the Spotify API? What’s the best approach to implement a queuing system for collaborative playlists at events?
Use the POST /v1/me/player/queue endpoint. Built something similar for a house party app last year and this worked perfectly for adding tracks without interrupting playback. You need an active Spotify Premium session running on a device first - that’s crucial. I kept hitting issues because I was testing without actually having Spotify playing on a device. Once there’s an active session, just POST to the queue endpoint with the track URI and it gets added to the end. Watch out for rate limiting when multiple people add songs rapidly - you’ll want some basic throttling. Also, the queue resets if users change playlists or devices, which caught me off guard during testing.
Been there with similar party setups. The API queue endpoint works but you’ll hit session management nightmares and device switching chaos.
Instead of fighting Spotify’s device limitations, I automated the whole thing through Latenode. Built a workflow that handles song requests, manages queuing logic, and syncs with Spotify seamlessly.
Latenode handles all the API calls, rate limiting, and error recovery automatically. When devices disconnect or sessions die, it switches to playlist fallbacks without missing a beat. Plus guests can see real-time queue management through your app.
Set up webhooks for song requests, connect Spotify nodes for API calls, and add database nodes to track queue state. Way cleaner than managing all those API edge cases manually.
Saved me weeks compared to building custom retry logic and session monitoring. The visual workflow makes debugging party scenarios much easier too.
The queue endpoint works fine, but device management is tricky in party apps. I built something similar for corporate events - keeping a Premium session active was the biggest headache. Set up a fallback that adds tracks to an actual Spotify playlist when the queue fails. This happens way more than you’d think when devices go offline or people switch apps. Queued tracks disappear when users change devices, so backup playlists save you. For group stuff, pick one device as the “master” player and check playback state before queuing. Otherwise you’ll hit dead sessions constantly.