Sound Cloud返回401错误

Recently I start work with Sound cloud API (PHP) and I decided to use PHP API by

https://github.com/mptre/php-soundcloud.

But When I am trying to get access token from Sound cloud server by this code:

// Get access token
try {
    $accessToken = $soundcloud->accessToken(isset($_GET['code']));
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
    exit($e->getMessage());
}

The SC returning 401 error after adding below code in my script

$curlPath = 'Fullpath\Of\cacert.crt';

$curlSSLSertificate = str_replace(array('/', '\'), DIRECTORY_SEPARATOR, $curlPath);

curl_setopt($ch, CURLOPT_CAINFO, $curlSSLSertificate);

We added this code to fix "The requested URL responded with HTTP code 0" issue

and after this we are getting 401 error.

Is there any way to fix this problem. If yes then Kindly, suggest me to look out there..

I think

$accessToken = $soundcloud->accessToken(isset($_GET['code']));

should read

$accessToken = $soundcloud->accessToken($_GET['code']);