Problem with getSearchRecords
Hello, I am receiving
<response><error><code>4834</code><message>Invalid Ticket Id</message></error></response>
I am trying to getSearchRecords with contacts I am not sure where my problem is at all. Any help would be greatly appreciated
- $plumberCode = htmlspecialchars($_POST['PlumCode']);
$token = htmlspecialchars($_POST['token']);
$url = "https://crm.zoho.com/crm/private/xml/Contacts/getSearchRecords";
$param= "authtoken=$token&scope=crmapi&selectColumns=Contacts(First Name,Last Name,Nom du Compte)&searchCondition=(Numéro de technicien|=|$plumberCode)";
/* initialize curl handle */
try {
$ch = curl_init();
/* set url to send post request */
curl_setopt($ch, CURLOPT_URL, $url);
/* allow redirects */
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
/* return a response into a variable */
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/* times out after 30s */
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
/* set POST method */
curl_setopt($ch, CURLOPT_POST, 1);
/* add POST fields parameters */
curl_setopt($ch, CURLOPT_POSTFIELDS, $parameter);
/* execute the cURL */
$result = curl_exec($ch);
curl_close($ch);
echo $result;
return $result;
} catch (Exception $exception) {
echo'Exception Message: ' . $exception->getMessage() . '<br/>';
echo'Exception Trace: ' . $exception->getTraceAsString();
}
The issue I am not sure on, is since some of the information is written in French, do the "Account Name" Variables switch to french as well ("Nom du Compte") or do I have to switch them to english and figure them out.
Thank you