This package implements a Spotify OAuth 2.0 provider for the league/oauth2-client library.
PHP 5.6 or higher is required.
Install with Composer by running:
composer require samdjstevens/oauth2-spotify
Create a new instance of the provider with your app details like so:
$provider = new \Samdjstevens\OAuth2\Client\Provider\Spotify([
'clientId' => 'YOUR_SPOTIFY_CLIENT_ID',
'clientSecret' => 'YOUR_SPOTIFY_CLIENT_SECRET',
'redirectUri' => 'https://example.com/callback-url',
]);
And then use with the league/oauth2-client
library as outlined here.