Title: Invalid API key generated
Last modified: August 13, 2020

---

# Invalid API key generated

 *  Resolved [jbrconnection](https://wordpress.org/support/users/jbrconnection/)
 * (@jbrconnection)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/invalid-api-key-generated/)
 * Hello !
 * I have problems with the API key.
 * No problem to create a new ticket on my osTicket instance if I use the email.
 * It is impossible if I use your plugin : the API key generated by my osTicket 
   instance is not recognised, and the creation of a new ticket via json is rejected.
   Here is an extract of the log file (for security reasons I have obfuscated some
   items) :
 * [2020-08-13 15:56:06]: Ticket data:
    array ( ‘name’ => ‘Jean-Benoit RICHARD’,’
   email’ => ‘jbrichard@xxx.fr’, ‘phone’ => ‘ x’, ‘subject’ => ‘Test 17:55’, ‘message’
   => ‘Avec PJ ?’, ‘ip’ => ‘176.XXX.XX.XX’, ‘topic’ => ‘Autres demandes’, ‘attachments’
   => array ( ), ‘priority’ => ‘1’, ) [2020-08-13 15:56:06]: Unable to create ticket:
   Valid API key required
 * My site is a WordPress 5.5 running on a shared host with php 7.3
 * My osTicket is osTicket (v1.14.2) running php 7.2.24 on a ubuntu server 18.04.3
   LTS

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [SCAND](https://wordpress.org/support/users/scandltd/)
 * (@scandltd)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/invalid-api-key-generated/#post-13251807)
 * Hi.
 * As we see the reason of failure is “Unable to create ticket: Valid API key required”
   and it means that API key was configured not properly.
 * Please check the settings of your osTicket instance. There should be an error
   log.
    The log should contain information about IP-address of your WP instance.
   Copy it and create new API key.
 * Best regards,
    SCAND Team
 *  Thread Starter [jbrconnection](https://wordpress.org/support/users/jbrconnection/)
 * (@jbrconnection)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/invalid-api-key-generated/#post-13256519)
 * Hi SCAND Team,
 * Thank you for such a quick reacton.
 * As you wrote, the error log shows that the requests come from an IP completely
   different from the public IP of the WordPress.
 * I generated the appropriate key, and everything is OK now.
 * I really appreciate your help. Thank you again.
 * Kind regards,
 * Jean-Benoit RICHARD
    CONNECTION
 *  [umarpro](https://wordpress.org/support/users/umarpro/)
 * (@umarpro)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/invalid-api-key-generated/#post-13465704)
 * Hi,
    I got the same issue and replaced the IP which I found in the log file, 
   but the error is still there.
 *     ```
       [2020-09-28 20:18:44]: Ticket data:
       array (
         'name' => 'umar',
         'email' => 'umar@xxx.com',
         'phone' => '',
         'subject' => 'TESTING',
         'message' => 'TEST',
         'ip' => '101.xx.xx.xx',
         'topic' => 'test',
         'attachments' => 
         array (
         ),
         'priority' => '2',
       )
       [2020-09-28 20:18:45]: Unable to create ticket: Valid API key required
       ```
   
 *  Plugin Author [SCAND](https://wordpress.org/support/users/scandltd/)
 * (@scandltd)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/invalid-api-key-generated/#post-13465794)
 * Hi.
 * The issue still on the osTicket side because next error “Unable to create ticket:
   Valid API key required” returns from osTicket API.
 * You should check logs in osTicket system. They are available when you logged 
   in as admin.
 * Best regards,
    SCAND Team

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Invalid API key generated’ is closed to new replies.

 * ![](https://ps.w.org/scand-osticket-connector/assets/icon-256x256.png?rev=1599758)
 * [osTicket Connector](https://wordpress.org/plugins/scand-osticket-connector/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/scand-osticket-connector/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/scand-osticket-connector/)
 * [Active Topics](https://wordpress.org/support/plugin/scand-osticket-connector/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/scand-osticket-connector/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/scand-osticket-connector/reviews/)

## Tags

 * [api key](https://wordpress.org/support/topic-tag/api-key/)

 * 4 replies
 * 3 participants
 * Last reply from: [SCAND](https://wordpress.org/support/users/scandltd/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/invalid-api-key-generated/#post-13465794)
 * Status: resolved