I able to create a ticket in OSticket by using api as below:
Header:
- Content-type : application/json
- X-API-Key : 11CB7DD1E1F02123XX0696C455053BFB
Body
{
"alert": true,
"autorespond": false,
"source": "API",
"name": "User Name",
"email": "ifwat@gmail.com",
"phone": "0178791211",
"subject": "Create ticket using API",
"ip": "10.224.16.*",
"message": "data:text/html,MESSAGE <b>User create using api</b>"
}
One X-API-Key for one IP address. Since I use this API in chatbot and install it in the same server with OSticket so I don't have to worry about the user's IP. By right my IP will be the same all the time.
But it's weird because the IP keep rotate between 10.224.16.4 and 10.22.16.5
So it will come out with "INVALID API KEY" when the X-API-Key is not for that IP.
when its failed I have to re-try again until 3 times then it will rotate and using ..*.4
Then after 2-3 times call this API it will change the API again to ..*.5
Please advise what should I do to make it the API never change and only use one either ..*.4 or ..*.5