- __construct
- addMyAlbums
- addMyAudiobooks
- addMyEpisodes
- addMyLibrary
- addMyShows
- addMyTracks
- addPlaylistItems
- addPlaylistTracks
- changeMyDevice
- changeVolume
- createPlaylist
- currentUserFollows
- currentUserFollowsPlaylist
- deleteMyAlbums
- deleteMyAudiobooks
- deleteMyEpisodes
- deleteMyLibrary
- deleteMyShows
- deleteMyTracks
- deletePlaylistItems
- deletePlaylistTracks
- followArtistsOrUsers
- followPlaylist
- getAlbum
- getAlbums
- getAlbumTracks
- getArtist
- getArtists
- getArtistRelatedArtists
- getArtistAlbums
- getArtistTopTracks
- getAudioAnalysis
- getAudiobook
- getAudiobooks
- getAudioFeatures
- getCategoriesList
- getCategory
- getCategoryPlaylists
- getChapter
- getChapters
- getEpisode
- getEpisodes
- getFeaturedPlaylists
- getGenreSeeds
- getLastResponse
- getMarkets
- getMultipleAudioFeatures
- getMyCurrentTrack
- getMyDevices
- getMyCurrentPlaybackInfo
- getMyPlaylists
- getMyQueue
- getMyRecentTracks
- getMySavedAlbums
- getMySavedAudiobooks
- getMySavedEpisodes
- getMySavedTracks
- getMySavedShows
- getMyTop
- getNewReleases
- getPlaylist
- getPlaylistImage
- getPlaylistItems
- getPlaylistTracks
- getRecommendations
- getRequest
- getShow
- getShowEpisodes
- getShows
- getTrack
- getTracks
- getUser
- getUserFollowedArtists
- getUserPlaylists
- me
- myAlbumsContains
- myAudiobooksContains
- myEpisodesContains
- myLibraryContains
- myShowsContains
- myTracksContains
- next
- pause
- play
- previous
- queue
- reorderPlaylistTracks
- repeat
- replacePlaylistTracks
- search
- seek
- setAccessToken
- setOptions
- setSession
- shuffle
- unfollowArtistsOrUsers
- unfollowPlaylist
- updatePlaylist
- updatePlaylistImage
- updatePlaylistItems
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.
- bool Whether the albums was successfully added.
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.
- bool Whether the audiobooks was successfully added.
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.
- bool Whether the episodes was successfully added.
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.
- bool Whether the items was successfully added.
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.
- bool Whether the shows was successfully added.
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.
- array ids Optional. An array of track IDs or URIs.
- array timestamped_ids Optional. An array of objects containing track IDs or URIs and added_at timestamp.
- bool Whether the tracks was successfully added.
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.
- int position Optional. Zero-based track position in playlist. Items will be appended if omitted or false.
- string|bool A new snapshot ID or false if the items weren't successfully added.
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.
- int position Optional. Zero-based track position in playlist. Tracks will be appended if omitted or false.
- string|bool A new snapshot ID or false if the tracks weren't successfully added.
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.
- string|array device_ids Required. ID of the device to switch to.
- bool play Optional. Whether to start playing on the new device
- bool Whether the playback device was successfully changed.
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.
- int volume_percent Required. The volume to set.
- string device_id Optional. ID of the device to target.
- bool Whether the playback volume was successfully changed.
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.
- string name Required. Name of the playlist.
- bool collaborative Optional. Whether the playlist should be collaborative or not.
- string description Optional. Description of the playlist.
- bool public Optional. Whether the playlist should be public or not.
- array|object The new playlist. Type is controlled by the
return_assocoption.
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.
- array Whether each user or artist is followed.
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.
- array Array containing one boolean describing whether the playlist is followed.
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.
- bool Whether the albums was successfully deleted.
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.
- bool Whether the audiobooks was successfully deleted.
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.
- bool Whether the episodes was successfully deleted.
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**
- bool Whether the items were successfully deleted.
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.
- bool Whether the shows was successfully deleted.
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.
- bool Whether the tracks was successfully deleted.
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.
- string|bool A new snapshot ID or false if the items weren't successfully deleted.
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:
- string uri Required. Track ID, track URI, or episode URI.
- int|array positions Optional. The track's positions in the playlist.
$snapshotIdstring - Required when$tracks['positions']is used, optional otherwise. The playlist's snapshot ID.
- string|bool A new snapshot ID or false if the tracks weren't successfully deleted.
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.
- bool Whether the artist or user was successfully followed.
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.
- bool Whether the playlist was successfully followed.
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.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- array|object The requested album. Type is controlled by the
return_assocoption.
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.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- array|object The requested albums. Type is controlled by the
return_assocoption.
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.
- int limit Optional. Limit the number of tracks.
- int offset Optional. Number of tracks to skip.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- array|object The requested album tracks. Type is controlled by the
return_assocoption.
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.
- array|object The requested artist. Type is controlled by the
return_assocoption.
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.
- array|object The requested artists. Type is controlled by the
return_assocoption.
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.
- array|object The artist's related artists. Type is controlled by the
return_assocoption.
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.
- string market Optional. Limit the results to items that are playable in this country, for example SE.
- string|array include_groups Optional. Album types to return. If omitted, all album types will be returned.
- int limit Optional. Limit the number of albums.
- int offset Optional. Number of albums to skip.
- array|object The artist's albums. Type is controlled by the
return_assocoption.
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.
- string market Required. An ISO 3166-1 alpha-2 country code specifying the country to get the top tracks for.
- array|object The artist's top tracks. Type is controlled by the
return_assocoption.
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.
- array|object The track's audio analysis. Type is controlled by the
return_assocoption.
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.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to audiobooks available in that market.
- array|object The requested audiobook. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getAudiobooks($audiobookIds, $options)Get multiple audiobooks.
https://developer.spotify.com/documentation/web-api/reference/get-multiple-audiobooks
* `$audiobookIds` **array** - IDs or URIs of the audiobooks.
* `$options` **array\|object** - Optional. Options for the audiobooks.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to audiobooks available in that market.
- array|object The requested audiobooks. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
SpotifyWebAPI::getAudioFeatures($trackId)Get audio features of a single track.
https://developer.spotify.com/documentation/web-api/reference/get-audio-features
* `$trackId` **string** - ID or URI of the track.
- array|object The track's audio features. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getCategoriesList($options)Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s "Discover" tab).
https://developer.spotify.com/documentation/web-api/reference/get-categories
* `$options` **array\|object** - Optional. Options for the categories.
- string locale Optional. Language to show categories in, for example 'sv_SE'.
- string country Optional. ISO 3166-1 alpha-2 country code. Show categories from this country.
- int limit Optional. Limit the number of categories.
- int offset Optional. Number of categories to skip.
- array|object The list of categories. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getCategory($categoryId, $options)Get a single category used to tag items in Spotify (on, for example, the Spotify player’s "Discover" tab).
https://developer.spotify.com/documentation/web-api/reference/get-a-category
* `$categoryId` **string** - ID of the category.
* `$options` **array\|object** - Optional. Options for the category.
- string locale Optional. Language to show category in, for example 'sv_SE'.
- string country Optional. ISO 3166-1 alpha-2 country code. Show category from this country.
- array|object The category. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getCategoryPlaylists($categoryId, $options)Get a list of Spotify playlists tagged with a particular category.
https://developer.spotify.com/documentation/web-api/reference/get-a-categories-playlists
* `$categoryId` **string** - ID of the category.
* `$options` **array\|object** - Optional. Options for the category's playlists.
- string country Optional. ISO 3166-1 alpha-2 country code. Show category playlists from this country.
- int limit Optional. Limit the number of playlists.
- int offset Optional. Number of playlists to skip.
- array|object The list of playlists. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getChapter($chapterId, $options)Get a chapter.
https://developer.spotify.com/documentation/web-api/reference/get-chapter
* `$chapterId` **string** - ID or URI of the chapter.
* `$options` **array\|object** - Optional. Options for the chapter.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to episodes available in that market.
- array|object The requested chapter. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getChapters($chapterIds, $options)Get multiple chapters.
https://developer.spotify.com/documentation/web-api/reference/get-several-chapters
* `$chapterIds` **array** - IDs or URIs of the chapters.
* `$options` **array\|object** - Optional. Options for the chapters.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to episodes available in that market.
- array|object The requested chapters. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getEpisode($episodeId, $options)Get an episode.
https://developer.spotify.com/documentation/web-api/reference/get-an-episode
* `$episodeId` **string** - ID or URI of the episode.
* `$options` **array\|object** - Optional. Options for the episode.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to episodes available in that market.
- array|object The requested episode. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getEpisodes($episodeIds, $options)Get multiple episodes.
https://developer.spotify.com/documentation/web-api/reference/get-multiple-episodes
* `$episodeIds` **string\|array** - IDs or URIs of the episodes.
* `$options` **array\|object** - Optional. Options for the episodes.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to episodes available in that market.
- array|object The requested episodes. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
SpotifyWebAPI::getFeaturedPlaylists($options)Get Spotify featured playlists.
https://developer.spotify.com/documentation/web-api/reference/get-featured-playlists
* `$options` **array\|object** - Optional. Options for the playlists.
- string locale Optional. Language to show playlists in, for example 'sv_SE'.
- string country Optional. ISO 3166-1 alpha-2 country code. Show playlists from this country.
- string timestamp Optional. A ISO 8601 timestamp. Show playlists relevant to this date and time.
- int limit Optional. Limit the number of playlists.
- int offset Optional. Number of playlists to skip.
- array|object The featured playlists. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
SpotifyWebAPI::getGenreSeeds()Get a list of possible seed genres.
https://developer.spotify.com/documentation/web-api/reference/get-recommendation-genres
- array|object All possible seed genres. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getLastResponse()Get the latest full response from the Spotify API.
- array Response data.
- array|object body The response body. Type is controlled by the
return_assocoption. - array headers Response headers.
- int status HTTP status code.
- string url The requested URL.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getMarkets()Get all markets where Spotify is available.
https://developer.spotify.com/documentation/web-api/reference/get-available-markets
- array|object All markets where Spotify is available. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
SpotifyWebAPI::getMultipleAudioFeatures($trackIds)Get audio features of multiple tracks.
https://developer.spotify.com/documentation/web-api/reference/get-several-audio-features
* `$trackIds` **string\|array** - IDs or URIs of the tracks.
- array|object The tracks' audio features. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMyCurrentTrack($options)Get the current user’s currently playing track.
https://developer.spotify.com/documentation/web-api/reference/get-the-users-currently-playing-track
* `$options` **array\|object** - Optional. Options for the track.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- string|array additional_types Optional. Types of media to return info about.
- array|object|null The user's currently playing track or null if nothing's currently playing.
Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMyDevices()Get the current user’s devices.
https://developer.spotify.com/documentation/web-api/reference/get-a-users-available-devices
- array|object The user's devices. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMyCurrentPlaybackInfo($options)Get the current user’s current playback information.
https://developer.spotify.com/documentation/web-api/reference/get-information-about-the-users-current-playback
* `$options` **array\|object** - Optional. Options for the info.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- string|array additional_types Optional. Types of media to return info about.
- array|object|null The user's playback information or null if nothing's currently playing.
Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMyPlaylists($options)Get the current user’s playlists.
https://developer.spotify.com/documentation/web-api/reference/get-a-list-of-current-users-playlists
* `$options` **array\|object** - Optional. Options for the playlists.
- int limit Optional. Limit the number of playlists.
- int offset Optional. Number of playlists to skip.
- array|object The user's playlists. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMyQueue()Get the current user’s queue.
https://developer.spotify.com/documentation/web-api/reference/get-queue
- array|object The currently playing song and queue. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMyRecentTracks($options)Get the current user’s recently played tracks.
https://developer.spotify.com/documentation/web-api/reference/get-recently-played
* `$options` **array\|object** - Optional. Options for the tracks.
- int limit Optional. Number of tracks to return.
- string after Optional. Unix timestamp in ms (13 digits). Returns all items after this position.
- string before Optional. Unix timestamp in ms (13 digits). Returns all items before this position.
- array|object The most recently played tracks. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMySavedAlbums($options)Get the current user’s saved albums.
https://developer.spotify.com/documentation/web-api/reference/get-users-saved-albums
* `$options` **array\|object** - Optional. Options for the albums.
- int limit Optional. Number of albums to return.
- int offset Optional. Number of albums to skip.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- array|object The user's saved albums. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMySavedAudiobooks($options)Get the current user’s saved audiobooks.
https://developer.spotify.com/documentation/web-api/reference/get-users-saved-audiobooks
* `$options` **array\|object** - Optional. Options for the audiobooks.
- int limit Optional. Number of audiobooks to return.
- int offset Optional. Number of audiobooks to skip.
- array|object The user's saved audiobooks. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMySavedEpisodes($options)Get the current user’s saved episodes.
https://developer.spotify.com/documentation/web-api/reference/get-users-saved-episodes
* `$options` **array\|object** - Optional. Options for the episodes.
- int limit Optional. Number of episodes to return.
- int offset Optional. Number of episodes to skip.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to episodes available in that market.
- array|object The user's saved episodes. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMySavedTracks($options)Get the current user’s saved tracks.
https://developer.spotify.com/documentation/web-api/reference/get-users-saved-tracks
* `$options` **array\|object** - Optional. Options for the tracks.
- int limit Optional. Limit the number of tracks.
- int offset Optional. Number of tracks to skip.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- array|object The user's saved tracks. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMySavedShows($options)Get the current user’s saved shows.
https://developer.spotify.com/documentation/web-api/reference/get-users-saved-shows
* `$options` **array\|object** - Optional. Options for the shows.
- int limit Optional. Limit the number of shows.
- int offset Optional. Number of shows to skip.
- array|object The user's saved shows. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getMyTop($type, $options)Get the current user's top tracks or artists.
https://developer.spotify.com/documentation/web-api/reference/get-users-top-artists-and-tracks
* `$type` **string** - The type to fetch, either 'artists' or 'tracks'.
* `$options` **array** - Optional. Options for the results.
- int limit Optional. Limit the number of results.
- int offset Optional. Number of results to skip.
- string time_range Optional. Over what time frame the data is calculated. See Spotify API docs for more info.
- array|object A list of the requested top entity. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getNewReleases($options)Get new releases.
https://developer.spotify.com/documentation/web-api/reference/get-new-releases
* `$options` **array\|object** - Optional. Options for the items.
- string country Optional. ISO 3166-1 alpha-2 country code. Show items relevant to this country.
- int limit Optional. Limit the number of items.
- int offset Optional. Number of items to skip.
- array|object The new releases. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getPlaylist($playlistId, $options)Get a specific playlist.
https://developer.spotify.com/documentation/web-api/reference/get-playlist
* `$playlistId` **string** - ID or URI of the playlist.
* `$options` **array\|object** - Optional. Options for the playlist.
- string|array fields Optional. A list of fields to return. See Spotify docs for more info.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- string|array additional_types Optional. Types of media to return info about.
- array|object The user's playlist. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getPlaylistImage($playlistId)Get a playlist's cover image.
https://developer.spotify.com/documentation/web-api/reference/get-playlist-cover
* `$playlistId` **string** - ID or URI of the playlist.
- array|object The playlist cover image. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getPlaylistItems($playlistId, $options)Get the items in a playlist.
https://developer.spotify.com/documentation/web-api/reference/get-playlists-items
* `$playlistId` **string** - ID or URI of the playlist.
* `$options` **array\|object** - Optional. Options for the items.
- string|array fields Optional. A list of fields to return. See Spotify docs for more info.
- int limit Optional. Limit the number of items.
- int offset Optional. Number of items to skip.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- string|array additional_types Optional. Types of media to return info about.
- array|object The items in the playlist. Type is controlled by the
return_assocoption.
Deprecated. Use SpotifyWebAPI::getPlaylistItems() instead.
SpotifyWebAPI::getPlaylistTracks($playlistId, $options)Get the tracks in a playlist.
https://developer.spotify.com/documentation/web-api/reference/get-playlists-tracks
* `$playlistId` **string** - ID or URI of the playlist.
* `$options` **array\|object** - Optional. Options for the tracks.
- string|array fields Optional. A list of fields to return. See Spotify docs for more info.
- int limit Optional. Limit the number of tracks.
- int offset Optional. Number of tracks to skip.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- string|array additional_types Optional. Types of media to return info about.
- array|object The tracks in the playlist. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
SpotifyWebAPI::getRecommendations($options)Get recommendations based on artists, tracks, or genres.
https://developer.spotify.com/documentation/web-api/reference/get-recommendations
* `$options` **array\|object** - Optional. Options for the recommendations.
- int limit Optional. Limit the number of recommendations.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- mixed max_* Optional. Max value for one of the tunable track attributes.
- mixed min_* Optional. Min value for one of the tunable track attributes.
- array seed_artists Artist IDs to seed by.
- array seed_genres Genres to seed by. Call SpotifyWebAPI::getGenreSeeds() for a complete list.
- array seed_tracks Track IDs to seed by.
- mixed target_* Optional. Target value for one of the tunable track attributes.
- array|object The requested recommendations. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getRequest()Get the Request object in use.
- \SpotifyWebAPI\Request The Request object in use.
SpotifyWebAPI::getShow($showId, $options)Get a show.
https://developer.spotify.com/documentation/web-api/reference/get-a-show
* `$showId` **string** - ID or URI of the show.
* `$options` **array\|object** - Optional. Options for the show.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to shows available in that market.
- array|object The requested show. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getShowEpisodes($showId, $options)Get a show's episodes.
https://developer.spotify.com/documentation/web-api/reference/get-a-shows-episodes
* `$showId` **string** - ID or URI of the album.
* `$options` **array\|object** - Optional. Options for the episodes.
- int limit Optional. Limit the number of episodes.
- int offset Optional. Number of episodes to skip.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to episodes available in that market.
- array|object The requested show episodes. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getShows($showIds, $options)Get multiple shows.
https://developer.spotify.com/documentation/web-api/reference/get-multiple-shows
* `$showIds` **string\|array** - IDs or URIs of the shows.
* `$options` **array\|object** - Optional. Options for the shows.
- string market Optional. ISO 3166-1 alpha-2 country code, limit results to shows available in that market.
- array|object The requested shows. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getTrack($trackId, $options)Get a track.
https://developer.spotify.com/documentation/web-api/reference/get-track
* `$trackId` **string** - ID or URI of the track.
* `$options` **array\|object** - Optional. Options for the track.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- array|object The requested track. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getTracks($trackIds, $options)Get multiple tracks.
https://developer.spotify.com/documentation/web-api/reference/get-several-tracks
* `$trackIds` **array** - IDs or URIs of the tracks.
* `$options` **array\|object** - Optional. Options for the tracks.
- string market Optional. ISO 3166-1 alpha-2 country code, provide this if you wish to apply Track Relinking.
- array|object The requested tracks. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getUser($userId)Get a user.
https://developer.spotify.com/documentation/web-api/reference/get-users-profile
* `$userId` **string** - ID or URI of the user.
- array|object The requested user. Type is controlled by the
return_assocoption.
SpotifyWebAPI::getUserFollowedArtists($options)Get the artists followed by the current user.
https://developer.spotify.com/documentation/web-api/reference/get-followed
* `$options` **array\|object** - Optional. Options for the artists.
- int limit Optional. Limit the number of artists returned.
- string after Optional. The last artist ID retrieved from the previous request.
- array|object A list of artists. Type is controlled by the
return_assocoption.
Deprecated. See https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security
SpotifyWebAPI::getUserPlaylists($userId, $options)Get a user's playlists.
https://developer.spotify.com/documentation/web-api/reference/get-list-users-playlists
* `$userId` **string** - ID or URI of the user.
* `$options` **array\|object** - Optional. Options for the tracks.
- int limit Optional. Limit the number of tracks.
- int offset Optional. Number of tracks to skip.
- array|object The user's playlists. Type is controlled by the
return_assocoption.
SpotifyWebAPI::me()Get the currently authenticated user.
https://developer.spotify.com/documentation/web-api/reference/get-current-users-profile
- array|object The currently authenticated user. Type is controlled by the
return_assocoption.
Deprecated. Use SpotifyWebAPI::myLibraryContains() instead.
SpotifyWebAPI::myAlbumsContains($albums)Check if albums are saved in the current user's Spotify library.
https://developer.spotify.com/documentation/web-api/reference/check-users-saved-albums
* `$albums` **string\|array** - Album IDs or URIs to check for.
- array Whether each album is saved.
Deprecated. Use SpotifyWebAPI::myLibraryContains() instead.
SpotifyWebAPI::myAudiobooksContains($audiobooks)Check if audiobooks are saved in the current user's Spotify library.
https://developer.spotify.com/documentation/web-api/reference/check-users-saved-audiobooks
* `$audiobooks` **string\|array** - Audiobook IDs or URIs to check for.
- array Whether each audiobook is saved.
Deprecated. Use SpotifyWebAPI::myLibraryContains() instead.
SpotifyWebAPI::myEpisodesContains($episodes)Check if episodes are saved in the current user's Spotify library.
https://developer.spotify.com/documentation/web-api/reference/check-users-saved-episodes
* `$episodes` **string\|array** - Episode IDs or URIs to check for.
- array Whether each episode is saved.
SpotifyWebAPI::myLibraryContains($uris)Check if items are saved in the current user's Spotify library.
https://developer.spotify.com/documentation/web-api/reference/check-library-contains
* `$uris` **string\|array** - Spotify URIs to check for.
- array Whether each item is saved.
Deprecated. Use SpotifyWebAPI::myLibraryContains() instead.
SpotifyWebAPI::myShowsContains($shows)Check if shows are saved in the current user's Spotify library.
https://developer.spotify.com/documentation/web-api/reference/check-users-saved-shows
* `$shows` **string\|array** - Show IDs or URIs to check for.
- array Whether each show is saved.
Deprecated. Use SpotifyWebAPI::myLibraryContains() instead.
SpotifyWebAPI::myTracksContains($tracks)Check if tracks are saved in the current user's Spotify library.
https://developer.spotify.com/documentation/web-api/reference/check-users-saved-tracks
* `$tracks` **string\|array** - Track IDs or URIs to check for.
- array Whether each track is saved.
SpotifyWebAPI::next($deviceId)Play the next track in the current users's queue.
https://developer.spotify.com/documentation/web-api/reference/skip-users-playback-to-next-track
* `$deviceId` **string** - Optional. ID of the device to target.
- bool Whether the track was successfully skipped.
SpotifyWebAPI::pause($deviceId)Pause playback for the current user.
https://developer.spotify.com/documentation/web-api/reference/pause-a-users-playback
* `$deviceId` **string** - Optional. ID of the device to pause on.
- bool Whether the playback was successfully paused.
SpotifyWebAPI::play($deviceId, $options)Start playback for the current user.
https://developer.spotify.com/documentation/web-api/reference/start-a-users-playback
* `$deviceId` **string** - Optional. ID of the device to play on.
* `$options` **array\|object** - Optional. Options for the playback.
- string context_uri Optional. URI of the context to play, for example an album.
- array uris Optional. Spotify track URIs to play.
- object offset Optional. Indicates from where in the context playback should start.
- int position_ms. Optional. Indicates the position to start playback from.
- bool Whether the playback was successfully started.
SpotifyWebAPI::previous($deviceId)Play the previous track in the current users's queue.
https://developer.spotify.com/documentation/web-api/reference/skip-users-playback-to-previous-track
* `$deviceId` **string** - Optional. ID of the device to target.
- bool Whether the track was successfully skipped.
SpotifyWebAPI::queue($trackUri, $deviceId)Add an item to the queue.
https://developer.spotify.com/documentation/web-api/reference/add-to-queue
* `$trackUri` **string** - Required. Track ID, track URI or episode URI to queue.
* `$deviceId` **string** - Optional. ID of the device to target.
- bool Whether the track was successfully queued.
Deprecated. Use SpotifyWebAPI::updatePlaylistItems() instead.
SpotifyWebAPI::reorderPlaylistTracks($playlistId, $options)Reorder the tracks in a playlist.
https://developer.spotify.com/documentation/web-api/reference/reorder-or-replace-playlists-tracks
* `$playlistId` **string** - ID or URI of the playlist.
* `$options` **array\|object** - Options for the new tracks.
- int range_start Required. Position of the first track to be reordered.
- int range_length Optional. The amount of tracks to be reordered.
- int insert_before Required. Position where the tracks should be inserted.
- string snapshot_id Optional. The playlist's snapshot ID.
- string|bool A new snapshot ID or false if the tracks weren't successfully reordered.
SpotifyWebAPI::repeat($options)Set repeat mode for the current user’s playback.
https://developer.spotify.com/documentation/web-api/reference/set-repeat-mode-on-users-playback
* `$options` **array\|object** - Optional. Options for the playback repeat mode.
- string state Required. The repeat mode. See Spotify docs for possible values.
- string device_id Optional. ID of the device to target.
- bool Whether the playback repeat mode was successfully changed.
Deprecated. Use SpotifyWebAPI::updatePlaylistItems() instead.
SpotifyWebAPI::replacePlaylistTracks($playlistId, $tracks)Replace all tracks in a playlist with new ones.
https://developer.spotify.com/documentation/web-api/reference/reorder-or-replace-playlists-tracks
* `$playlistId` **string** - ID or URI of the playlist.
* `$tracks` **string\|array** - IDs, track URIs, or episode URIs to replace with.
- bool Whether the tracks was successfully replaced.
SpotifyWebAPI::search($query, $type, $options)Search for an item.
https://developer.spotify.com/documentation/web-api/reference/search
* `$query` **string** - The term to search for.
* `$type` **string\|array** - The type of item to search for.
* `$options` **array\|object** - Optional. Options for the search.
- string market Optional. Limit the results to items that are playable in this market, for example SE.
- int limit Optional. Limit the number of items.
- int offset Optional. Number of items to skip.
- string include_external Optional. Whether or not to mark externally hosted content as playable.
- array|object The search results. Type is controlled by the
return_assocoption.
SpotifyWebAPI::seek($options)Change playback position for the current user.
https://developer.spotify.com/documentation/web-api/reference/seek-to-position-in-currently-playing-track
* `$options` **array\|object** - Optional. Options for the playback seeking.
- string position_ms Required. The position in milliseconds to seek to.
- string device_id Optional. ID of the device to target.
- bool Whether the playback position was successfully changed.
SpotifyWebAPI::setAccessToken($accessToken)Set the access token to use.
* `$accessToken` **string** - The access token.
- self
SpotifyWebAPI::setOptions($options)Set options
* `$options` **array\|object** - Options to set.
- self
SpotifyWebAPI::setSession($session)Set the Session object to use.
* `$session` **\SpotifyWebAPI\Session** - The Session object.
- self
SpotifyWebAPI::shuffle($options)Set shuffle mode for the current user’s playback.
https://developer.spotify.com/documentation/web-api/reference/toggle-shuffle-for-users-playback
* `$options` **array\|object** - Optional. Options for the playback shuffle mode.
- bool state Required. The shuffle mode. See Spotify docs for possible values.
- string device_id Optional. ID of the device to target.
- bool Whether the playback shuffle mode was successfully changed.
Deprecated. Use SpotifyWebAPI::deleteMyLibrary() instead.
SpotifyWebAPI::unfollowArtistsOrUsers($type, $ids)Remove the current user as a follower of one or more artists or other Spotify users.
https://developer.spotify.com/documentation/web-api/reference/unfollow-artists-users
* `$type` **string** - The type to check: either 'artist' or 'user'.
* `$ids` **string\|array** - IDs or URIs of the users or artists to unfollow.
- bool Whether the artists or users were successfully unfollowed.
Deprecated. Use SpotifyWebAPI::deleteMyLibrary() instead.
SpotifyWebAPI::unfollowPlaylist($playlistId)Remove the current user as a follower of a playlist.
https://developer.spotify.com/documentation/web-api/reference/unfollow-playlist
* `$playlistId` **string** - ID or URI of the playlist to unfollow.
- bool Whether the playlist was successfully unfollowed.
SpotifyWebAPI::updatePlaylist($playlistId, $options)Update the details of a playlist.
https://developer.spotify.com/documentation/web-api/reference/change-playlist-details
* `$playlistId` **string** - ID or URI of the playlist to update.
* `$options` **array\|object** - Options for the playlist.
- bool collaborative Optional. Whether the playlist should be collaborative or not.
- string description Optional. Description of the playlist.
- string name Optional. Name of the playlist.
- bool public Optional. Whether the playlist should be public or not.
- bool Whether the playlist was successfully updated.
SpotifyWebAPI::updatePlaylistImage($playlistId, $imageData)Update the image of a playlist.
https://developer.spotify.com/documentation/web-api/reference/upload-custom-playlist-cover
* `$playlistId` **string** - ID or URI of the playlist to update.
* `$imageData` **string** - Base64 encoded JPEG image data, maximum 256 KB in size.
- bool Whether the playlist was successfully updated.
SpotifyWebAPI::updatePlaylistItems($playlistId, $options)Update the items in a playlist.
https://developer.spotify.com/documentation/web-api/reference/reorder-or-replace-playlists-items
* `$playlistId` **string** - ID or URI of the playlist.
* `$options` **array\|object** - Options for the new items.
- array uris Optional. Array of item or episode URIs to set in the playlist.
- int range_start Optional. Position of the first item to be reordered.
- int range_length Optional. The amount of items to be reordered.
- int insert_before Optional. Position where the items should be inserted.
- string snapshot_id Optional. The playlist's snapshot ID.
- string|bool A new snapshot ID or false if the items weren't successfully updated.