How to queue tracks using Spotify Web API endpoints

I’m working on a party app where guests can request music. I know about the Spotify Web API player endpoints that let you control playback, but I’m trying to figure out how to add songs to the queue instead of playing them immediately.

Basically I want people to be able to add their song requests to a waiting list that plays one after another. The regular play endpoint just starts playing right away which isn’t what I need.

Has anyone worked with queueing functionality in the Spotify API? I’m not sure if there’s a specific endpoint for this or if I need to handle the queue logic myself. Any suggestions would be really helpful since I can’t find clear documentation about this specific use case.

Yeah, there’s a queue endpoint in Spotify’s Web API that does exactly this. Just POST to https://api.spotify.com/v1/me/player/queue with the track URI and it’ll add songs without interrupting what’s playing. Built something similar last year - works great. Just make sure the user’s got Spotify running on a device or it’ll fail. Songs play in order after the current track ends. Watch out for rate limiting at parties though - I had to add throttling so we wouldn’t hit API limits when everyone’s adding songs at once.