Description Usage Arguments References Examples
Add Tracks to a Playlist Add one or more tracks to a users playlist
1 | add_tracks_to_playlist(user_id, playlist_id, uris)
|
user_id |
The user's Spotify user ID. |
uris |
Optional. A comma-separated list of Spotify track URIs to add. For example: uris=spotify:track:4iV5W9uYEdYUVa79Axb7Rh, spotify:track:1301WleyT98MSxVHPZCA6M |
name |
Required. 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. |
1 2 3 4 5 6 | set_tokens()
user_auth()
add_tracks_to_playlist(user_id = 'rweyant', playlist_id = '4Ej1T0FVGBCmwXapPGK2eP', uris = 'spotify:track:4S47FRAZ3VcyZS87FnQtmk')
add_tracks_to_playlist(user_id = 'rweyant',
playlist_id = '4Ej1T0FVGBCmwXapPGK2eP',
uris = c('spotify:track:4S47FRAZ3VcyZS87FnQtmk', 'spotify:track:3MXA2BkBk0lSuMpRoM7SK2'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.