getPlaylistTracks

suspend fun getPlaylistTracks(playlist: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<PlaylistTrack>(source)

Get full details of the tracks of a playlist owned by a Spotify user.

Note that both Public and Private playlists belonging to any user are retrievable on provision of a valid access token.

Warning: if the playlist contains podcasts, the tracks will be null if you are using SpotifyAppApi.

Api Reference

Parameters

playlist

The id or uri for the playlist.

market

Provide this parameter if you want to apply Track Relinking

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 playlist cannot be found