follow_playlist: Add Current User to Followers of Playlist.

View source: R/follow.R

follow_playlistR Documentation

Add Current User to Followers of Playlist.

Description

Add Current User to Followers of Playlist.

Usage

follow_playlist(
  playlist_id,
  public = FALSE,
  authorization = get_spotify_authorization_code()
)

Arguments

playlist_id

Required. The Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID.

public

Optional. Defaults to TRUE. If TRUE the playlist will be included in the user's public playlists, if FALSE it will remain private. o be able to follow playlists privately, the user must have granted the playlist-modify-private scope.

authorization

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.
Following a publicly followed playlist for a user requires authorization of the playlist-modify-public scope; following a privately followed playlist requires the playlist-modify-private scope. See Using Scopes.
Note that the scopes you provide relate only to whether the current user is following the playlist publicly or privately (i.e. showing others what they are following), not whether the playlist itself is public or private.

Value

The response from the Spotify Web API on the PUT request, with a meaningful error message if the operation was not successful.


spotifyr documentation built on Oct. 30, 2024, 9:13 a.m.