createClientPlaylist

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

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

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

Api Reference

Return

The created Playlist object with no tracks

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.PLAYLIST_MODIFY_PRIVATE and SpotifyScope.PLAYLIST_MODIFY_PUBLIC scopes.

Sources

(source)
Link copied to clipboard