Get All Records of Zoho CRM by Using PHP Curl

Access Zoho API using PHP Curl

Access Zoho API and Fetch all Zoho CRM records after create Zoho Postman Access token and refresh token with create PHP Curl.

Fetch Zoho CRM Data using API


$url = "";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$output = json_decode($result, true);
$access_token = $output['access_token'];
echo $access_token;
echo '<br />';

For Above code you get the Zoho Access Code


By using below PHP code get all leads records thru using PHP Curl and result will print in your browser with JSON format

$headerTwo =array("Authorization: Zoho-oauthtoken $access_token");
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headerTwo);
$return = curl_exec ($curl);
curl_close ($curl);

$outputZoho = json_decode($return, true);

echo '<pre>';
echo '</pre>';