ReferenceIdoITObjects on OTRS 3.3.9
-
Dear all,
I'm hoping someone can help me here. I'm using the ReferenceIdoitObjects module for OTRS and appear to have successfully installed it, except that when I click on the 'Reference i-doit objects' button in OTRS, I just get the 'Loading…' message. I have followed the installation instructions.
I turned on Fiddler to try and work out exactly what the issue is and I got the following response when the module tried to call over to the i-doit server via the API proxy I set up:
Headers:Request URL: https://{my.idoit.fqdn}/index.php?api=jsonrpc Request Method: OPTIONS Status Code: 200 Query Url api: jsonrpc Request Headers Access-Control-Request-Method: POST Origin: http://{my.otrs.fqdn} User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Access-Control-Request-Headers: accept, content-type Accept: */* Referer: http://{my.otrs.fqdn}/otrs/index.pl?Action=AgentReferenceIDoitObjects;TicketID=3 Accept-Encoding: gzip, deflate, sdch, br Accept-Language: en-US,en;q=0.8 Response Headers Date: Wed, 06 Jul 2016 16:44:07 GMT Server: Apache/2.4.7 (Ubuntu) X-Powered-By: PHP/5.5.9-1ubuntu4.11 Set-Cookie: PHPSESSID=rqnelm3a6vl0v1kheop31binb7; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Length: 257 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
Response:
{"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid request","data":{"error":"This is not a JSON-RPC. The content-type should be application\/json, request method should be \"post\" and the http body should be a valid json-rpc 2.0 package."}},"id":0}
Is there something I've misconfigured? I believe I followed the README.md file closely, please let me know if any additional information is needed.
-
I figured it out. Our i-doit instance is set to require authentication from JSON-RPC calls, which are not included in the JS files in the module. I unchecked this option and it works. As this is a test environment this is fine for now, but I may need to hard-code authentication at a later date when we move into production.