So I'm trying to get a playlist with SoundCloud API, but I'm getting a 401 when setting an access token.
<?PHP
require_once('Services/Soundcloud.php');
$client = new Services_Soundcloud('id', 'secret', 'uri');
if (!isset($_GET['code']))
{
header("Location: " . $client->getAuthorizeUrl());
}
$access_token = $client->accessToken($_GET['code']);
$client->setAccessToken($access_token);
?>
I think it may be a problem with me reusing the access token (maybe?). I'm not sure.