Invalid Ticket Id

Invalid Ticket Id

I'm getting this response on the api:

  1. <response><error><code>4834</code><message>Invalid Ticket Id</message></error></response>

It looks like tickets were deprecated, so I'm not sure why I would be getting that. Here's the PHP code

  1. $xml = '<Leads>';
  2. $xml .= '<row no="1">';
  3. $xml .= '<FL val="Lead Source">Source</FL>';
  4. $xml .= '<FL val="First Name">'.htmlspecialchars($entry['first_name']).'</FL>';
  5. $xml .= '<FL val="Last Name">'.htmlspecialchars($entry['last_name']).'</FL>';
  6. $xml .= '<FL val="Email">'.htmlspecialchars($entry['email']).'</FL>';
  7. $xml .= '</row>';
  8. $xml .= '</Leads>';

  9. $url = "https://crm.zoho.com/crm/private/xml/Leads/insertRecords";
  10. $query = "newFormat=1&authtoken=".$this->zoho_auth_token."&scope=crmapi&xmlData=".urlencode($xml);
  11. $ch = curl_init();
  12. curl_setopt($ch, CURLOPT_URL, $url);
  13. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  14. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  15. curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  16. curl_setopt($ch, CURLOPT_POST, 1);
  17. curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
  18. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  19. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

  20. $response = curl_exec($ch);
  21. curl_close($ch);
  22. var_dump($response);