NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #3114 most downloaded on Packagist
A PHP wrapper for Spotify's Web API.
Last release 2 months ago
25 Jul 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
96 releases · first in 2014
Marked SpotifyWebAPI::getCategoryPlaylists() as deprecated.
SpotifyWebAPI::getAudiobookChapters() method. (c8abfb9)SpotifyWebAPIException::isQuotaExceeded() helper. (049543d)SpotifyWebAPI::getCategoryPlaylists() as deprecated. (052f30d)One column per quarter.
Deprecated the following methods due to February 2026 Spotify Web API changes:
SpotifyWebAPI::addMyAlbums()SpotifyWebAPI::addMyAudiobooks()SpotifyWebAPI::addMyEpisodes()SpotifyWebAPI::addMyLibrary()SpotifyWebAPI::addMyShows()SpotifyWebAPI::addMyTracks()SpotifyWebAPI::addPlaylistTracks()SpotifyWebAPI::currentUserFollows()SpotifyWebAPI::currentUserFollowsPlaylist()SpotifyWebAPI::deleteMyAlbums()SpotifyWebAPI::deleteMyAudiobooks()SpotifyWebAPI::deleteMyEpisodes()SpotifyWebAPI::deleteMyLibrary()SpotifyWebAPI::deleteMyShows()SpotifyWebAPI::deleteMyTracks()SpotifyWebAPI::deletePlaylistTracks()SpotifyWebAPI::followArtistsOrUsers()SpotifyWebAPI::followArtistsOrUsers()SpotifyWebAPI::followPlaylist()SpotifyWebAPI::getAlbums()SpotifyWebAPI::getArtists()SpotifyWebAPI::getArtistTopTracks()SpotifyWebAPI::getAudiobooks()SpotifyWebAPI::getCategoriesList()SpotifyWebAPI::getCategory()SpotifyWebAPI::getChapters()SpotifyWebAPI::getEpisodes()SpotifyWebAPI::getMarkets()SpotifyWebAPI::getNewReleases()SpotifyWebAPI::getPlaylistTracks()SpotifyWebAPI::getShows()SpotifyWebAPI::getTracks()SpotifyWebAPI::getUserPlaylists()SpotifyWebAPI::myAlbumsContains()SpotifyWebAPI::myAudiobooksContains()SpotifyWebAPI::myEpisodesContains()SpotifyWebAPI::myShowsContains()SpotifyWebAPI::myTracksContains()SpotifyWebAPI::reorderPlaylistTracks()SpotifyWebAPI::replacePlaylistTracks()SpotifyWebAPI::unfollowArtistsOrUsers()SpotifyWebAPI::unfollowPlaylist()SpotifyWebAPI::addMyAudiobooks() (9f6f8ad)SpotifyWebAPI::addMyLibrary() (3e91670)SpotifyWebAPI::addPlaylistItems() (ad903a7)SpotifyWebAPI::deleteMyAudiobooks() (9f6f8ad)SpotifyWebAPI::deleteMyLibrary() (6531b15)SpotifyWebAPI::deletePlaylistItems() (958cbe0)SpotifyWebAPI::getMySavedAudiobooks() (9f6f8ad)SpotifyWebAPI::getPlaylistItems() (c8d3904)SpotifyWebAPI::myAudiobooksContains() (9f6f8ad)SpotifyWebAPI::myLibraryContains() (b3870b7)SpotifyWebAPI::updatePlaylistItems() (890926a)SpotifyWebAPI::createPlaylist() will now always use the current user. (01e53a5)Breaking Removed deprecated SpotifyWebAPI::usersFollowPlaylist() method. Use SpotifyWebAPI::currentUserFollowsPlaylist() instead.
SpotifyWebAPI::usersFollowPlaylist() method. Use SpotifyWebAPI::currentUserFollowsPlaylist() instead. (12f1596)SpotifyWebAPI::createPlaylist() without a user ID is no longer possible. (80adafd)SpotifyWebAPI::addMyTracks() without ids or timestamped_ids is no longer possible. (1b12cda)Removed deprecated curl_close() calls.
Added support for timestamped_ids to SpotifyWebAPI::addMyTracks() and deprecated passing strings or array without an ids key.
timestamped_ids to SpotifyWebAPI::addMyTracks() and deprecated passing strings or array without an ids key. (f17cdff)default_headers options to add HTTP headers that should be included in each request. (ef9b92e)SpotifyWebAPI::usersFollowPlaylist(), use SpotifyWebAPI::currentUserFollowsPlaylist() instead. (1427059)Marked deprecated endpoints in inline docs.
Corrected request bodies of SpotifyWebAPI::addMy* methods.
Added Request::parseBody() helper method.
Request::parseBody() helper method. (980e2b2)Updated successful response code check in SpotifyWebAPI::replacePlaylistTracks().
SpotifyWebAPI::replacePlaylistTracks(). (bc402ce)Fixed faulty passing of null in SpotifyWebAPI::followPlaylist() and SpotifyWebAPI::play().
Corrected return value of SpotifyWebAPI::getSnapshotId().
Fixed faulty endpoint URL in SpotifyWebAPI::createPlaylist().
SpotifyWebAPI::createPlaylist(). (c1a499c)Calling SpotifyWebAPI::createPlaylist() without a user ID is now deprecated and will print warnings.
SpotifyWebAPI::getAudioFeatures() no longer accepts arrays, SpotifyWebAPI::getMultipleAudioFeatures() should be used instead. (ec4ccd2)SpotifyWebAPI::createPlaylist() without a user ID is now deprecated and will print warnings. (055f3df)Fixed faulty endpoint URL in SpotifyWebAPI::createPlaylist().
SpotifyWebAPI::createPlaylist(). (c1a499c)Added support for passing a user ID to SpotifyWebAPI::createPlaylist(). (b91f71)
The following setters now returns self:
self: (fe2e90f)
Request::setOptions()Session::setAccessToken()Session::setClientId()Session::setClientSecret()Session::setRedirectUri()Session::setRefreshToken()SpotifyWebAPI::setAccessToken()SpotifyWebAPI::setOptions()SpotifyWebAPI::setSession()Added missiing $options argument to SpotifyWebAPI::getAudiobook() and SpotifyWebAPI::getAudiobooks() methods.
$options argument to SpotifyWebAPI::getAudiobook() and SpotifyWebAPI::getAudiobooks() methods. (12293f1)Added methods to get info about audiobooks: (f79b95e):
Added the SpotifyWebAPI::getMyQueue() method to get the current user's queue.
Added additional_types option support to SpotifyWebAPI::getPlaylist() and SpotifyWebAPI::getPlaylistTracks().
The deprecated way of passing arrays to SpotifyWebAPI::getAudioFeatures() will now print run time warnings.
Session::refreshAccessToken() will no longer send client secret when none exists.
Session::refreshAccessToken() will no longer send client secret when none exists. (7e35d41)Fixed an issue where errors returned from cURL would not be read properly.
Exceptions thrown on failing requests will now try a bit harder to give a failure reason by falling back to the complete response body.
Breaking Removed the following, deprecated methods:
Request::getReturnType() - Use the return_assoc option instead.Request::setReturnType() - Use the return_assoc option instead.Request::setCurlOptions() - Use the curl_options option instead.SpotifyWebAPI::followPlaylistForCurrentUser() - Use SpotifyWebAPI::followPlaylist() instead.SpotifyWebAPI::unfollowPlaylistForCurrentUser() - Use SpotifyWebAPI::unfollowPlaylist() instead.SpotifyWebAPI::getReturnType() - Use the return_assoc option instead.SpotifyWebAPI::setReturnType() - Use the return_assoc option instead.SpotifyWebAPI::deletePlaylistTracks() no longer accepts the id key, the uri key should be used instead. (403a8a2)SpotifyWebAPI::getArtistAlbums() no longer accepts the album_type option, the include_groups option should be used instead. (4cf3301)SpotifyWebAPI::__construct() will no longer accept Request objects as the first argument. (1f08d8)SpotifyWebAPI::addPlaylistTracks() will now return snapshot IDs insteadd of a boolean. (d6167a3)Added methods to control the episodes in a user's library: (b89299d):
SpotifyWebAPI::addMyEpisodes()SpotifyWebAPI::deleteMyEpisodes()SpotifyWebAPI::getMySavedEpisodes()SpotifyWebAPI::myEpisodesContains()SpotifyWebAPI::getMultipleAudioFeatures() method to get the audio features of multiple tracks. SpotifyWebAPI::getAudioFeatures() will now return the audio features of a single track unless passed an array which will maintain the old behaviour. (d282e9d)SpotifyWebAPI::getMarkets() method to get the markets where Spotify is available. (181cc28)Fixed an issue where empty arrays would be passed to Spotify, causing errors.
Fixed http_build_query calls passing null instead of empty strings.
Added a Session::generateState() method.
HTTP 100 Continue headers which is sometimes returned are now stripped.
Added the SpotifyWebAPI::getPlaylistImage() method to get a playlist's cover image.
SpotifyWebAPI::getPlaylistImage() method to get a playlist's cover image. (7a4f0e6)Breaking Dropped support for PHP versions less than 7.2.
Made sure & is always passed to all http_build_query() calls.
Fixed an issue with the auto retry feature sometimes not working correctly due to lowercased header names.
Methods deprecated in 3.x releases will now print deprecation warnings.
Fixed an issue where URIs couldn't be passed in SpotifyWebAPI::deletePlaylistTracks().
Added support for the PKCE authorization flow.
Added the SpotifyWebAPI::queue() method to add tracks to the user's playback queue.
SpotifyWebAPI::queue() method to add tracks to the user's playback queue. (d6859a5)Options and Session instance can now be passed to the SpotifyWebAPI constructor.
Added support for new Podcast endpoints (eba5971):
SpotifyWebAPI::addMyShows()SpotifyWebAPI::getMySavedShows()SpotifyWebAPI::getShow()SpotifyWebAPI::getShows()SpotifyWebAPI::getShowEpisodes()SpotifyWebAPI::getEpisode()SpotifyWebAPI::getEpisodes()SpotifyWebAPI::myShowsContains()SpotifyWebAPI::deleteMyShows()additional_types option to (b04e06e):
SpotifyWebAPI::getMyCurrentTrack()SpotifyWebAPI::getMyCurrentPlaybackInfo()Deprecated the following methods (e643628):
SpotifyWebAPI::followPlaylistForCurrentUser() (use SpotifyWebAPI::followPlaylist() instead)SpotifyWebAPI::unfollowPlaylistForCurrentUser() (use SpotifyWebAPI::unfollowPlaylist() instead)SpotifyWebAPI::addPlaylistTracks() to always send everything in request body. (ac862ef)SpotifyWebAPI::authHeaders(). (7d0badd)Breaking The following, deprecated, methods have been removed (02d5598):
SpotifyWebAPI::addUserPlaylistTracks() (use SpotifyWebAPI::addPlaylistTracks() instead)SpotifyWebAPI::createUserPlaylist() (use SpotifyWebAPI::createPlaylist() instead)SpotifyWebAPI::deleteUserPlaylistTracks() (use SpotifyWebAPI::deletePlaylistTracks() instead)SpotifyWebAPI::followPlaylist() (use SpotifyWebAPI::followPlaylistForCurrentUser() instead)SpotifyWebAPI::getUserPlaylist() (use SpotifyWebAPI::getPlaylist() instead)SpotifyWebAPI::getUserPlaylistTracks() (use SpotifyWebAPI::getPlaylistTracks() instead)SpotifyWebAPI::reorderUserPlaylistTracks() (use SpotifyWebAPI::reorderPlaylistTracks() instead)SpotifyWebAPI::replaceUserPlaylistTracks() (use SpotifyWebAPI::replacePlaylistTracks() instead)SpotifyWebAPI::unfollowPlaylist() (use SpotifyWebAPI::unfollowPlaylistForCurrentUser() instead)SpotifyWebAPI::updateUserPlaylist() (use SpotifyWebAPI::updatePlaylist() instead)SpotifyWebAPI::updateUserPlaylistImage() (use SpotifyWebAPI::updatePlaylistImage() instead)SpotifyWebAPI::userFollowsPlaylist() (use SpotifyWebAPI::usersFollowPlaylist() instead)SpotifyWebAPI::userFollowsPlaylist() (use SpotifyWebAPI::usersFollowPlaylist() instead)tracks in calls to SpotifyWebAPI::deletePlaylistTracks(). (3562402)SpotifyWebAPI::getReturnType()/SpotifyWebAPI::setReturnType() and Request::getReturnType()/Request::setReturnType() are deprecated. Use the new return_assoc option instead. (2a3d5ee)Request::setCurlOptions() is deprecated. Use the new curl_options option instead. (1615d07)Added support for automatically retrying rate limited requests.
Remove unfinished code that accidentally snuck into 2.11.0.
2.11.0. (eb3f51c)Added support for automatically refreshing access tokens.
Fixed an issue where SpotifyWebAPI::deletePlaylistTracks() wouldn't return the snapshot ID when return type was set to SpotifyWebAPI::RETURN_ASSOC.
SpotifyWebAPI::deletePlaylistTracks() wouldn't return the snapshot ID when return type was set to SpotifyWebAPI::RETURN_ASSOC. (f9d580f)SpotifyWebAPI::reorderPlaylistTracks() wouldn't return the snapshot ID when return type was set to SpotifyWebAPI::RETURN_ASSOC. (89fe613)Added a $options argument to SpotifyWebAPI::getAlbum().
$options argument to SpotifyWebAPI::getAlbum(). (e92121f)The following deprecated methods will now emit a run time notice when used (fc1e535):
SpotifyWebAPI::addUserPlaylistTracks()SpotifyWebAPI::createUserPlaylist()SpotifyWebAPI::deleteUserPlaylistTracks()SpotifyWebAPI::followPlaylistForCurrentUser()SpotifyWebAPI::getUserPlaylist()SpotifyWebAPI::getUserPlaylistTracks()SpotifyWebAPI::reorderUserPlaylistTracks()SpotifyWebAPI::replaceUserPlaylistTracks()SpotifyWebAPI::unfollowPlaylistForCurrentUser()SpotifyWebAPI::updateUserPlaylist()SpotifyWebAPI::updateUserPlaylistImage()SpotifyWebAPI::usersFollowPlaylist$tracks without a tracks or positions key to SpotifyWebAPI::deletePlaylistTracks a run time notice will be emitted. (2f457bd)Added a Request::setCurlOptions() method to make it possible to set custom cURL options.
Request::setCurlOptions() method to make it possible to set custom cURL options. (5a8b1e5)Added a SpotifyWebAPIException::getReason() method to retrieve the reason for a player error.
Corrected the authorization URL
Deprecated the following methods (6f1bb6b):
$userId (6f1bb6b):
SpotifyWebAPI::followPlaylistForCurrentUser()SpotifyWebAPI::unfollowPlaylistForCurrentUser()SpotifyWebAPI::usersFollowPlaylistSpotifyWebAPI::followPlaylist()SpotifyWebAPI::unfollowPlaylist()SpotifyWebAPI::userFollowPlaylistCorrected the URI in SpotifyWebAPI::createUserPlaylist().
SpotifyWebAPI::createUserPlaylist(). (d8a59eb)Because of recent changes in the handling of playlist related calls, the following methods are deprecated (a05db96):
SpotifyWebAPI::addUserPlaylistTracks()SpotifyWebAPI::createUserPlaylist()SpotifyWebAPI::deleteUserPlaylistTracks()SpotifyWebAPI::getUserPlaylist()SpotifyWebAPI::getUserPlaylistTracks()SpotifyWebAPI::reorderUserPlaylistTracks()SpotifyWebAPI::replaceUserPlaylistTracks()SpotifyWebAPI::updateUserPlaylist()SpotifyWebAPI::updateUserPlaylistImage()$userId (a05db96):
SpotifyWebAPI::addPlaylistTracks()SpotifyWebAPI::createPlaylist()SpotifyWebAPI::deletePlaylistTracks()SpotifyWebAPI::getPlaylist()SpotifyWebAPI::getPlaylistTracks()SpotifyWebAPI::reorderPlaylistTracks()SpotifyWebAPI::replacePlaylistTracks()SpotifyWebAPI::updatePlaylist()SpotifyWebAPI::updatePlaylistImage()Authentication errors will now throw an SpotifyWebAPIAuthException instead of the regular SpotifyWebAPIException.
SpotifyWebAPIAuthException instead of the regular SpotifyWebAPIException. (4b068d0)Restored support for PHP 5.6. It's used by too many at this point and nothing PHP 7 specific is really used.
When running behind a proxy, the first set of proxy response headers are now stripped.
Added positions support to SpotifyWebAPI::deleteUserPlaylistTracks().
Fixed an issue where a new refresh token wouldn't be properly updated in the Session class when a new one was returned from Spotify.
Session class when a new one was returned from Spotify. (2bf18e0)Added the Session::getScope() method to check which scopes that are granted by the current user.
Your coding agent can read these notes before it upgrades. Set up the MCP server →