This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$client_id = '<insert your spotify app client id>'; | |
$client_secret = '<insert your spotify app client secret>'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://accounts.spotify.com/api/token' ); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 ); | |
curl_setopt($ch, CURLOPT_POST, 1 ); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, 'grant_type=client_credentials' ); |