I am trying to execute a PHP code base for GET API request, but I am getting
“AAR: 002” “No JWT Found”
error. below is the code
I am executing a GET request with cURL commands in PHP . The same code base and keys are working fine in Java and C# but when trying in PHP got this error.
When I try executing the below query
//echo $jwt ;
$options = array(
//CURLOPT_FAILONERROR => false,
CURLOPT_RETURNTRANSFER => true,
// CURLOPT_AUTOREFERER => true,
// CURLOPT_HEADER => true,
// CURLOPT_NOBODY =>true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_SSLKEY =>$privatekey_sslkey,
CURLOPT_SSLCERT => $pem,
CURLOPT_KEYPASSWD => $sslCertPass,
CURLOPT_SSLCERTPASSWD =>$sslCertPass,
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_SSL_VERIFYPEER => true,
// CURLOPT_POST => false,
// CURLOPT_POSTFIELDS => $jwt,
CURLOPT_HTTPHEADER => array(
"Content-Type => application/json",
"JWTToken => $jwt",
"Pragma => akamai-x-get-extracted-values"
),
);
//print_r( $options);
curl_setopt_array($ch,$options );
$resp = curl_exec($ch);
echo $resp;
$ch_errno = curl_errno($ch);
$ch_erro = curl_error($ch);
curl_close($ch);
if ($ch_errno)
{
echo "cURL Error #:". $ch_erro;
}
else
{
echo "Response:".$resp;
}
?>