FreshDesk API with PHP
Hello guys,premise: I read all the support pages without finding a solution! :)I wanted info on the use of an API in PHPI need to figure out how to insert a ticket into the system via API<?PHP$email = "email_fresh_desk@mail.com";$password = "password";$key = "api key"; // (This parameter is used?) $urltopost = "https://my_portal.freshdesk.com/helpdesk/tickets.xml"; $datatopost = "<helpdesk_ticket> <description>Ticket test API!!!</description> <subject>Test ticket creation api</subject> <email>email_user@mail.com</email> <priority>1</priority> <status-name>Open</status-name> <status>2</status> <source>3</source></helpdesk_ticket>"; $ch = curl_init ($urltopost); //curl_setopt($ch, CURLOPT_POST, true); // (This parameter is used?) curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($ch, CURLOPT_USERPWD, "$email:$password"); curl_setopt($ch,