HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
I am trying to refresh the access token using API with PHP CURL before it was working fine, but now it is throwing this error message:
Â
HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
This is the code:
Â
$ch = curl_init();
$base = 'https://authz.constantcontact.com/oauth2/default/v1/token';
$url = $base . '?refresh_token=' . $refreshToken . '&grant_type=refresh_token';
curl_setopt($ch, CURLOPT_URL, $url);
$auth = $clientId . ':' . $clientSecret;
$credentials = base64_encode($auth);
$authorization = 'Authorization: Basic ' . $credentials;
curl_setopt($ch, CURLOPT_HTTPHEADER, array($authorization, 'Content-Type: application/x-www-form-urlencoded'));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
return $result;
Â
 Please guide how to fix this.
Popular Posts:
đ Coming Soon: A New and Improved Canva Integration!
đ What Industry Are You In? Cast Your Vote!
âď¸Whatâs Your Open Rate MVP?