SpotifyWebAPI::__construct($options, $session, $request)
Constructor Set options and class instances to use.
* `$options` **array\|object** - Optional. Options to set.
* `$session` **\SpotifyWebAPI\Session** - Optional. The Session object to use.
* `$request` **\SpotifyWebAPI\Request** - Optional. The Request object to use.
Deprecated. Use SpotifyWebAPI::addMyLibrary() instead.
SpotifyWebAPI::addMyAlbums($albums)
Add albums to the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/save-albums-user
* `$albums` **string\|array** - Album IDs or URIs to add.
Deprecated. Use SpotifyWebAPI::addMyLibrary() instead.
SpotifyWebAPI::addMyAudiobooks($audiobooks)
Add audiobooks to the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/save-audiobooks-user
* `$audiobooks` **string\|array** - Audiobook IDs or URIs to add.
Deprecated. Use SpotifyWebAPI::addMyLibrary() instead.
SpotifyWebAPI::addMyEpisodes($episodes)
Add episodes to the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/save-episodes-user
* `$episodes` **string\|array** - Episode IDs or URIs to add.
SpotifyWebAPI::addMyLibrary($uris)
Add items to the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/save-library-items
* `$uris` **string\|array** - Spotify URIs to add.
Deprecated. Use SpotifyWebAPI::addMyLibrary() instead.
SpotifyWebAPI::addMyShows($shows)
Add shows to the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/save-shows-user
* `$shows` **string\|array** - Show IDs or URIs to add.
Deprecated. Use SpotifyWebAPI::addMyLibrary() instead.
SpotifyWebAPI::addMyTracks($tracks)
Add tracks to the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/save-tracks-user
* `$tracks` **array\|object** - Track IDs or URIs to add. One of "ids" or "timestamped_ids" key must be present.
SpotifyWebAPI::addPlaylistItems($playlistId, $items, $options)
Add items to a playlist. https://developer.spotify.com/documentation/web-api/reference/add-items-to-playlist
* `$playlistId` **string** - ID of the playlist to add items to.
* `$items` **string\|array** - Track and episode URIs to add.
* `$options` **array\|object** - Optional. Options for the new items.
Deprecated. Use SpotifyWebAPI::addPlaylistItems() instead.
SpotifyWebAPI::addPlaylistTracks($playlistId, $tracks, $options)
Add tracks to a playlist. https://developer.spotify.com/documentation/web-api/reference/add-tracks-to-playlist
* `$playlistId` **string** - ID of the playlist to add tracks to.
* `$tracks` **string\|array** - Track IDs, track URIs, and episode URIs to add.
* `$options` **array\|object** - Optional. Options for the new tracks.
SpotifyWebAPI::changeMyDevice($options)
Change the current user's playback device. https://developer.spotify.com/documentation/web-api/reference/transfer-a-users-playback
* `$options` **array\|object** - Options for the playback transfer.
SpotifyWebAPI::changeVolume($options)
Change playback volume for the current user. https://developer.spotify.com/documentation/web-api/reference/set-volume-for-users-playback
* `$options` **array\|object** - Optional. Options for the playback volume.
SpotifyWebAPI::createPlaylist($userId, $options)
Create a new playlist for the current user. https://developer.spotify.com/documentation/web-api/reference/create-playlist
* `$userId` **string** - Deprecated. The current user will always be used.
* `$options` **array\|object** - Options for the new playlist.
return_assoc option.Deprecated. Use SpotifyWebAPI::myLibraryContains() instead.
SpotifyWebAPI::currentUserFollows($type, $ids)
Check to see if the current user is following one or more artists or other Spotify users. https://developer.spotify.com/documentation/web-api/reference/check-current-user-follows
* `$type` **string** - The type to check: either 'artist' or 'user'.
* `$ids` **string\|array** - IDs or URIs of the users or artists to check for.
Deprecated. Use SpotifyWebAPI::myLibraryContains() instead.
SpotifyWebAPI::currentUserFollowsPlaylist($playlistId)
Check if the current user is following a playlist. https://developer.spotify.com/documentation/web-api/reference/check-if-user-follows-playlist
* `$playlistId` **string** - ID or URI of the playlist to check.
Deprecated. Use SpotifyWebAPI::deleteMyLibrary() instead.
SpotifyWebAPI::deleteMyAlbums($albums)
Delete albums from the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/remove-albums-user
* `$albums` **string\|array** - Album IDs or URIs to delete.
Deprecated. Use SpotifyWebAPI::deleteMyLibrary() instead.
SpotifyWebAPI::deleteMyAudiobooks($audiobooks)
Delete audiobooks from the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/remove-audiobooks-user
* `$audiobooks` **string\|array** - Audiobook IDs or URIs to delete.
Deprecated. Use SpotifyWebAPI::deleteMyLibrary() instead.
SpotifyWebAPI::deleteMyEpisodes($episodes)
Delete episodes from the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/remove-episodes-user
* `$episodes` **string\|array** - Episode IDs or URIs to delete.
SpotifyWebAPI::deleteMyLibrary($uris)
Delete items from the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/remove-library-items
* `$uris` **string|array**
Deprecated. Use SpotifyWebAPI::deleteMyLibrary() instead.
SpotifyWebAPI::deleteMyShows($shows)
Delete shows from the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/remove-shows-user
* `$shows` **string\|array** - Show IDs or URIs to delete.
Deprecated. Use SpotifyWebAPI::deleteMyLibrary() instead.
SpotifyWebAPI::deleteMyTracks($tracks)
Delete tracks from the current user's Spotify library. https://developer.spotify.com/documentation/web-api/reference/remove-tracks-user
* `$tracks` **string\|array** - Track IDs or URIs to delete.
SpotifyWebAPI::deletePlaylistItems($playlistId, $items, $snapshotId)
Delete items from a playlist and retrieve a new snapshot ID. https://developer.spotify.com/documentation/web-api/reference/remove-items-playlist
* `$playlistId` **string** - ID or URI of the playlist to delete tracks from.
* `$items` **array** - An array of objects containing track or episode URIs.
* `$snapshotId` **string** - Optional. The playlist's snapshot ID.
Deprecated. Use SpotifyWebAPI::deletePlaylistItems() instead.
SpotifyWebAPI::deletePlaylistTracks($playlistId, $tracks, $snapshotId)
Delete tracks from a playlist and retrieve a new snapshot ID. https://developer.spotify.com/documentation/web-api/reference/remove-tracks-playlist
* `$playlistId` **string** - ID or URI of the playlist to delete tracks from.
* `$tracks` **array** - An array with the key "tracks" containing arrays or objects with tracks to delete.
Or an array with the key "positions" containing integer positions of the tracks to delete. If the "tracks" key is used, the following fields are also available:
$snapshotId string - Required when $tracks['positions'] is used, optional otherwise.
The playlist's snapshot ID.Deprecated. Use SpotifyWebAPI::addMyLibrary() instead.
SpotifyWebAPI::followArtistsOrUsers($type, $ids)
Add the current user as a follower of one or more artists or other Spotify users. https://developer.spotify.com/documentation/web-api/reference/follow-artists-users
* `$type` **string** - The type of ID to follow: either 'artist' or 'user'.
* `$ids` **string\|array** - IDs or URIs of the users or artists to follow.
Deprecated. Use SpotifyWebAPI::addMyLibrary() instead.
SpotifyWebAPI::followPlaylist($playlistId, $options)
Add the current user as a follower of a playlist. https://developer.spotify.com/documentation/web-api/reference/follow-playlist
* `$playlistId` **string** - ID or URI of the playlist to follow.
* `$options` **array\|object** - Unused. Use SpotifyWebAPI::updatePlaylist() instead.
SpotifyWebAPI::getAlbum($albumId, $options)
Get an album. https://developer.spotify.com/documentation/web-api/reference/get-an-album
* `$albumId` **string** - ID or URI of the album.
* `$options` **array\|object** - Optional. Options for the album.
return_assoc option.Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getAlbums($albumIds, $options)
Get multiple albums. https://developer.spotify.com/documentation/web-api/reference/get-multiple-albums
* `$albumIds` **array** - IDs or URIs of the albums.
* `$options` **array\|object** - Optional. Options for the albums.
return_assoc option.SpotifyWebAPI::getAlbumTracks($albumId, $options)
Get an album's tracks. https://developer.spotify.com/documentation/web-api/reference/get-an-albums-tracks
* `$albumId` **string** - ID or URI of the album.
* `$options` **array\|object** - Optional. Options for the tracks.
return_assoc option.SpotifyWebAPI::getArtist($artistId)
Get an artist. https://developer.spotify.com/documentation/web-api/reference/get-an-artist
* `$artistId` **string** - ID or URI of the artist.
return_assoc option.Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getArtists($artistIds)
Get multiple artists. https://developer.spotify.com/documentation/web-api/reference/get-multiple-artists
* `$artistIds` **array** - IDs or URIs of the artists.
return_assoc option.Deprecated. See https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
SpotifyWebAPI::getArtistRelatedArtists($artistId)
Get an artist's related artists. https://developer.spotify.com/documentation/web-api/reference/get-an-artists-related-artists
* `$artistId` **string** - ID or URI of the artist.
return_assoc option.SpotifyWebAPI::getArtistAlbums($artistId, $options)
Get an artist's albums. https://developer.spotify.com/documentation/web-api/reference/get-an-artists-albums
* `$artistId` **string** - ID or URI of the artist.
* `$options` **array\|object** - Optional. Options for the albums.
return_assoc option.Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getArtistTopTracks($artistId, $options)
Get an artist's top tracks in a country. https://developer.spotify.com/documentation/web-api/reference/get-an-artists-top-tracks
* `$artistId` **string** - ID or URI of the artist.
* `$options` **array\|object** - Options for the tracks.
return_assoc option.Deprecated. See https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
SpotifyWebAPI::getAudioAnalysis($trackId)
Get audio analysis for track. https://developer.spotify.com/documentation/web-api/reference/get-audio-analysis
* `$trackId` **string** - ID or URI of the track.
return_assoc option.SpotifyWebAPI::getAudiobook($audiobookId, $options)
Get an audiobook. https://developer.spotify.com/documentation/web-api/reference/get-an-audiobook
* `$audiobookId` **string** - ID or URI of the audiobook.
* `$options` **array\|object** - Optional. Options for the audiobook.
How can I help you explore Laravel packages today?