Invalid ticket id received when inserting records
Hello everyone, I'm getting an error code 4834 when trying to insert Contacts with the insertRecords method. I'm sure that the authToken I'm using is correct, since I'm able to getRecords correctly.
I'm using PHP, here is the POST parameters I send:
- $params = array(
"authToken" => $authtoken,
"scope" => "crmapi",
"xmlData" => $xmlData,
"newFormat" => "1",
"duplicateCheck" => "1",
"version" => "4"
$xmlData is an XML string that I form with this function:
- function XMLfy($data, $module)
{
$xml = "<".$module.">";
$no = 1;
foreach($data as $item)
{
$xml .= "<row no=\"$no\">";
foreach($item as $key => $val)
{
$xml .= "<FL val=\"$key\">$val</FL>";
}
$xml .= "</row>";
$no++;
}
$xml .= "</".$module.">";
return $xml;
}
This function receives the following associative array and transforms it to XML:
- $testArray = array(
"First Name" => "testname",
"Last Name" => "lastname",
"Email" => "test@zoho.com"
);
Finally, this is the URL that CURL calls:
- $url = "https://crm.zoho.com/crm/private/xml/Contacts/insertRecords";
Any help will be appreciated, thanks in advance.