Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

How to create ticket from an extern page

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'=>'http://localhost/prestashop/api/tickets.json', ; // URL to site.tld/api/tickets.json
        'key'=>'DEA27CA7F6A55B93A94284A12FE7BE5C'  // API Key goes here
$data = array(
    'name'      =>      'ben',  // from name aka User/Client Name
    'email'     =>      '',  // 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()


  • 1.8.7 is ancient.  You should upgrade to something more... recent.

    This article may assist you.  It's a little dated but the basics are the same.
  • Hello, it's working, I could generate a ticket from a third-party. I have a question, how could I share a method to use in a source code to create o generate directly the ticket. The ticket will always have the same content, so I could predefinite the attribute value in the code. anyone have an idea?
    Thanks in advance.
Sign In or Register to comment.