followPlaylist

suspend fun followPlaylist(playlist: String, followPublicly: Boolean = true): String(source)

Add the current user as a follower of a playlist.

Following a playlist publicly requires authorization of the SpotifyScope.PlaylistModifyPublic scope; following it privately requires the SpotifyScope.PlaylistModifyPrivate scope.

Note that the scopes you provide determine only whether the current user can themselves follow the playlist publicly or privately (i.e. show others what they are following), not whether the playlist itself is public or private.

Api Reference

Parameters

playlist

the id or uri of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID.

followPublicly

Defaults to true. If true the playlist will be included in user’s public playlists, if false it will remain private. To be able to follow playlists privately, the user must have granted the playlist-modify-private scope.

Throws

if the playlist is not found