• Resolved jaytech87

    (@jaytech87)


    Hi,

    I’m running wordpress on a windows machine, I think that the syntax for sending the post request may not work on it. I’ve set up everything, however in the log all I see is this after submitting the form:

    [2021-04-14 19:50:35]: Ticket data:
    array (
      'name' => 'username',
      'email' => '[email protected]',
      'phone' => '1234567895',
      'subject' => 'Testing',
      'message' => 'teststa',
      'ip' => '192.168.1.1',
      'attachments' => 
      array (
      ),
      'priority' => '2',
    )
    [2021-04-14 19:50:35]: Unable to create ticket:

    The attempt doesn’t even show up in the osticket logs so I’m assuming it’s a syntax issue while running the curl command.

    I tried replicating the post in a command prompt and the syntax needed to be in this form:

    curl -d “{\”name\”:\”name\”, \”subject\”:\”This is a test\”, \”message\”:\”Help\”, \”ip\”:\”192.168.1.1\”, \”email\”:\”[email protected]\”}” -H “X-API-Key: XXXXXXXXXXXXXXXXXXXXXXXXX” https://support.xyz.xyz/api/tickets.json

    I was able to create a ticket with that syntax. Any help would be greatly appreciated.

Viewing 1 replies (of 1 total)
  • Plugin Author SCAND

    (@scandltd)

    Hi.

    Could you try to enable PHP error/warnings and see if there will be some error?

    Best regards,
    SCAND team

Viewing 1 replies (of 1 total)
  • The topic ‘Syntax For Curl’ is closed to new replies.