Hello All,

I am trying to call http://localhost/osticket/api/tickets.json Create Ticket API, I am facing below issue :- ERROR: Failed to create ticket: Unauthorized - Valid API key required. For this I have generated API key providing machine IP Address and when am trying to enable that generated that API key , its showing error as mentioned in screenshot

please help on this how to enable api key and if enabled , will issue get resolved.

Thanks in advance.

    SwatiG

    Valid API Key Required most likely means the IP making the request does not match the one you used for the key in osTicket. You can enable the debug logs, make a request, and then check the logs to see the full error. Then in the error you’ll see the real IP that was used for the request. If it doesn’t match then create a new key for the IP and use that.

    It’s most likely already enabled so it can’t enable an already enabled key.

    Cheers.

      KevinTheJedi
      The request is going through localhost or 127.0.0.1. And API Key has created for IP address 127.0.0.1. While enabling API for this IP, its throwing an error "Unable to enable selected API Key". Can you please guide here ?

        5 months later

        SwatiG Hola consulta. Te fue posible hacer funcionar la API. Me comentas. Gracias

        7 days later

        Your screen shot says that it cant enable the key.
        How the key is already set to status active.
        aka its already enabled.

        Write a Reply...