Skip to content

Instantly share code, notes, and snippets.

@hycday
hycday / callback.php
Last active March 2, 2017 23:04
Spotify Web API PHP Auth + getMyHistory example
<?php
//file should be named index.php, and placed in callback subdirectories
error_reporting(-1);
ini_set('display_errors', 1);
require '../vendor/autoload.php';
$session = new SpotifyWebAPI\Session('CLIENT_ID', 'CLIENT_SECRET', 'https://mysite.com/callback');
$api = new SpotifyWebAPI\SpotifyWebAPI();