createClientPlaylist

suspend fun createClientPlaylist(name: String, description: String? = null, public: Boolean? = null, collaborative: Boolean? = null, user: String? = null): Playlist(source)

Create a playlist for a Spotify user. (The playlist will be empty until you add playables.)

Creating a public playlist for a user requires authorization of the SpotifyScope.PlaylistModifyPublic scope; creating a private playlist requires the SpotifyScope.PlaylistModifyPrivate scope.

Api Reference

Return

The created Playlist object with no playables

Parameters

user

The user’s Spotify user ID.

name

The name for the new playlist, for example "Your Coolest Playlist" . This name does not need to be unique; a user may have several playlists with the same name.

description
public

Defaults to true . If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope.

collaborative

Defaults to false . If true the playlist will be collaborative. Note that to create a collaborative playlist you must also set public to false . To create collaborative playlists you must have granted SpotifyScope.PlaylistModifyPrivate and SpotifyScope.PlaylistModifyPublic scopes.