Hello, I need to create tickets from extern page of osticket, I read that I have to generate a key and put the page IP.
I did the test with prestashop, I've put the code below in the prestashop folder root, sometimes I've the authentification popup displayed but that generateme an error. how could I have the ticket creation operates in prestashop for exemple?
// You must configure the url and key in the array below.
$config = array(
; // URL to site.tld/api/tickets.json
'key'=>'DEA27CA7F6A55B93A94284A12FE7BE5C' // API Key goes here
$data = array(
'name' => 'ben', // from name aka User/Client Name
'email' => 'firstname.lastname@example.org', // from email aka User/Client Email
'phone' => '1234567890', // phone number aka User/Client Phone Number
'subject' => 'Test API message', // test subject, aka Issue Summary
'message' => 'This is a test of the osTicket API', // test ticket body, aka Issue Details.
'ip' => $_SERVER['REMOTE_ADDR'], // Should be IP address of the machine thats trying to open the ticket.
'topicId' => '1'; // the help Topic that you want to use for the ticket
//'Agency' => '58', //this is an example of a custom list entry. This should be the number of the entry.
//'Site' => 'Bermuda'; // this is an example of a custom text field. You can push anything into here you want.
'attachments' => array()