Zoho CRM v2.0 API cURL
Zoho CRM v2.0 API cURL
Hello,
I am using the Zoho CRM v2.0 API's to insert new leads. I am using it in Wordpress and here is the below curl Request that I am using.
headr = array();
$headr[] = "Authorization:Zoho-oauthtoken secretTokenHashed";
$headr[] = "Content-Type:application/json";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.zohoapis.com/crm/v2/Leads");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($crl, CURLOPT_HTTPHEADER,$headr);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
$result = curl_exec($ch);
curl_close($ch);
But It returns with an UnAuthorized access, if I use the command mentioned in the API's it works perfectly in Linux but gives error on Windows.
Please help.
Thanks