Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Spotify

Laravel Spotify Laravel Package

aerni/laravel-spotify

Laravel Spotify makes it easy to work with Spotify's Web API in your Laravel app. It handles OAuth authentication and token refresh, and provides a fluent wrapper for making API requests, so you can fetch tracks, albums, playlists, and more with minimal setup.

View on GitHub
Deep Wiki
Context7

Spotify for Laravel is a simple wrapper around the Spotify Web API that makes working with its endpoints a breeze!

Frequently asked questions about Laravel Spotify
What is aerni/laravel-spotify used for in a Laravel application?
It is a thin, facade-based wrapper around the Spotify Web API that lets you fetch tracks, albums, playlists, artists, and more from your Laravel code. It handles OAuth authentication and token refresh for you, so you can focus on building features instead of managing HTTP calls and credentials. Because it plugs into Laravel's service container and configuration system, it fits naturally into existing Laravel projects.
How do I install aerni/laravel-spotify with Composer?
Require the package through Composer, then publish its configuration file so you can add your Spotify client ID, client secret, and redirect URI. Register your Spotify application in the Spotify Developer Dashboard and make sure the redirect URI matches what you set in the config. After that, you can start resolving the facades and calling endpoints directly.
How does authentication and token refresh work in this package?
The package wraps Spotify's OAuth flow and stores the access and refresh tokens for you, refreshing the access token automatically when it expires. You point it at your configured credentials and it manages the token lifecycle behind the scenes. This means you generally do not need to write your own refresh logic unless you are building a multi-user flow where you persist tokens per user yourself.
Which Laravel and PHP versions does version 3.0.0 support?
The v3.0.0 release notes do not state an explicit PHP or Laravel support matrix, so you should check the package's composer.json and CI configuration before upgrading. Treat the constraints there as authoritative for your project. Because v3 is a major release, constrain your dependency to ^3.0 only after you have confirmed compatibility with your Laravel and PHP versions.
What are the breaking changes in laravel-spotify v3.0.0?
Version 3.0.0 removes Spotify Web API endpoints that Spotify has deprecated for newly created apps, removes the related SpotifySeed class, and drops the Spotify and SpotifyClient aliases in favor of explicit facades. There are no net-new product capabilities in this release; it is a conformance-driven update aligned with Spotify's current API surface. The main decision is whether to stay on v2 for compatibility or move to v3 and drop the unsupported features.
How do I migrate from use Spotify or use SpotifyClient to the new facades in v3?
Replace imports of use Spotify with use Aerni\Spotify\Facades\Spotify and use SpotifyClient with use Aerni\Spotify\Facades\SpotifyClient. The alias removal is low complexity but broad in impact if those imports are scattered across your codebase, so search for them project-wide first. After updating, remove or replace any calls to the deprecated endpoints and drop all SpotifySeed usage.
Which Spotify endpoints were removed in v3 and what should I do if I use them?
The removed methods include artistRelatedArtists, categoryPlaylists, featuredPlaylists, recommendations, availableGenreSeeds, audioAnalysisForTrack, audioFeaturesForTrack, and audioFeaturesForTracks. If your product relies on any of them, inventory the usage first and decide whether to keep the package pinned to ^2.0 or to change product scope. Leaving v2 pinned should be documented as an explicit exception with a plan and timeline.
Does the Spotify newly-created-app restriction affect my upgrade decision?
Spotify's deprecation of those endpoints only affects newly created Spotify applications, so confirm whether your Spotify app counts as existing or newly created. If your app is existing and still has access, staying on v2 with pinned constraints may be viable for a while. Either way, plan for eventual removal rather than assuming the endpoints will remain available indefinitely.
How should I test a Laravel Spotify integration before deploying to production?
Run integration tests against Spotify sandbox or test credentials and deploy through a staging environment before production. Because the highest risk in v3 is silent or runtime breakage from undefined methods and classes, add tests that cover every removed method and every legacy alias import you replaced. Avoid combining this upgrade with unrelated Spotify API or authentication changes so failures are easy to isolate.
Is aerni/laravel-spotify still actively maintained, and what alternatives exist?
v3.0.0 reduces maintenance burden by removing deprecated endpoint wrappers and aligning the package with Spotify's current API constraints, which suggests ongoing maintenance rather than abandonment. There is no documented deprecation or support timeline for v2, so ask the maintainer if long-term v2 support matters to you. Alternatives include other Spotify API client libraries or a custom Guzzle-based client if you need full control, though you would then own the OAuth and refresh logic yourself.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin