PHP code example of samdjstevens / oauth2-spotify

1. Go to this page and download the library: Download samdjstevens/oauth2-spotify library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

samdjstevens / oauth2-spotify example snippets


$provider = new \Samdjstevens\OAuth2\Client\Provider\Spotify([
    'clientId' => 'YOUR_SPOTIFY_CLIENT_ID',
    'clientSecret' => 'YOUR_SPOTIFY_CLIENT_SECRET',
    'redirectUri' => 'https://example.com/callback-url',
]);