HiI'm developing a mashup in Infor M3 Smart Office to implement workflow ex from sales management. Here I want to create a ticket in osTicket from the SmartOffice client, and I have to use jscript and .NET code to create the ticket.I have created a API-key with the corresponding IP-address in osTicket. But since the script executes locally on the users computer, the IP-address changes and I see no way to create API-keys for every computer.But Is there a way to only validate on the API_key and NOT the IP-address??The script works if both the API-key and IP-address is valid.The message are genereated as: const APIKey = "F513B438D6343B83497C2176F6DBF11B";
const IPaddress = "10.10.1.36"; private function BuildXMLdata()
{
var nl = Environment.NewLine;
xmlSendData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + nl +
"<ticket alert=\"true\" autorespond=\"true\" source=\"API\">" + nl +
"<name>" + userName + " (API)</name>" + nl +
"<email>" + mailaddress + "</email>" + nl +
"<subject>Testing API from jscript</subject>" + nl +
"<phone ext=\"" + phoneext + "\">" + phone + "</phone>" + nl +
//"<message><![CDATA
></message>" + nl +
"<message>" + message + "</message>" + nl +
"<ip>" + IPaddress + "</ip>" + nl + // $_SERVER,
"</ticket>";
}To send the data I use XMLHTTP and the function looks like this: public function SendXMLdata()
{
debug.WriteLine("SendXMLdata starter ... ");
xmlHTTP = new ActiveXObject("MSXML2.XMLHTTP.3.0"); // 'MSXML2.XMLHTTP.3.0' // Microsoft.XMLHTTP
xmlHTTP.open("POST", TicketURL, false); xmlHTTP.setRequestHeader("X-API-Key", APIKey); xmlHTTP.setRequestHeader("Content-type", "text/xml");
xmlHTTP.send(xmlSendData);
var strStatus = xmlHTTP.Status
var strRetval = xmlHTTP.responseText; }