Add one or more tracks to a user<U+2019>s playlist.

Add one or more tracks to a user<U+2019>s playlist.

add_tracks_to_playlist(playlist_id, uris, position = NULL,
  authorization = get_spotify_authorization_code())

Required. The Spotify ID for the playlist.


Optional. A character vector of Spotify track URIs to add. For example uris = "spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "spotify:track:1301WleyT98MSxVHPZCA6M" A maximum of 100 tracks can be added in one request.


Optional. Integer indicating the position to insert the tracks, a zero-based index. For example, to insert the tracks in the first position: position = 0; to insert the tracks in the third position: position = 2 . If omitted, the tracks will be appended to the playlist. Tracks are added in the order they are listed in the query string or request body.


Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to spotifyr::get_spotify_authorization_code(). The access token must have been issued on behalf of the current user. Adding tracks to the current user<U+2019>s public playlists requires authorization of the playlist-modify-public scope; adding tracks to the current user<U+2019>s private playlist (including collaborative playlists) requires the playlist-modify-private scope. See Using Scopes.

  • add_tracks_to_playlist
Documentation reproduced from package spotifyr, version 2.1.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.