setClientPlaylistTracksRestAction

fun setClientPlaylistTracksRestAction(playlist: String, vararg tracks: String): SpotifyRestAction<Unit>

Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist.

Setting tracks in the current user’s public playlists requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; setting tracks in the current user’s private playlist (including collaborative playlists) requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.

Api Reference

Parameters

playlist

The id or uri for the playlist.

tracks

The Spotify track ids. Maximum 100.

Throws

if playlist is not found or illegal tracks are provided

Sources

(source)
Link copied to clipboard