$curl = curl_init();
$auth_data = array(
'client_id' => CLIENT_ID,
'client_secret' => CLIENT_SECRET,
'code' => PRIVATE_TOKEN,
'grant_type' => 'authorization_code',
);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $auth_data);
curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($curl, CURLOPT_URL, $request_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC)
$result = curl_exec($curl);
if(!$result){die("Connection Failure");}
curl_close($curl);
echo $result;
I have confirmed my auth_data multiple times.
But always getting above response.
Can any one help me.
Thanks.