getUserPlaylists

suspend fun getUserPlaylists(user: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null): PagingObject<SimplePlaylist>(source)

Get a list of the playlists owned or followed by a Spotify user. Lookups for non-existant users return an empty PagingObject (blame Spotify)

Note that private playlists are only retrievable for the current user and require the SpotifyScope.PlaylistReadPrivate scope to have been authorized by the user. Note that this scope alone will not return a collaborative playlist, even though they are always private. Collaborative playlists are only retrievable for the current user and require the SpotifyScope.PlaylistReadCollaborative scope to have been authorized by the user.

Api Reference

Return

PagingObject of SimplePlaylists ONLY if the user can be found. Otherwise, an empty paging object is returned. This does not have the detail of full Playlist objects.

Parameters

user

The user’s Spotify user ID.

limit

The number of objects to return. Default: 50 (or api limit). Minimum: 1. Maximum: 50.

offset

The index of the first item to return. Default: 0. Use with limit to get the next set of items

Throws

if the user is not found (404)