Start a new topic
Solved

Fresh Desk APP Integration

We ar developing a fresh desk app we are getting the ticket information by using "onTicketPropertiesUpdated" event and calling a .net webAPI which is hosted in our (SSL+domain) server and recieving the data there and processing it but we were not able to call the web API while testing it locally.


i am attaching the file app.js you can check the function called "ticketPropertiesUpdated : function() {}" where we used two types of ajax calls 


1. $request.post call

2. jQuery.ajax call


Both are not working


for the 1st option we are getting following error


frameworks-b0c418c….js:27 Mixed Content: The page at 'https://koutilya999.freshdesk.com/helpdesk/tickets/7' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://localhost:10001/dprouter'. This request has been blocked; the content must be served over HTTPS.


for the 2nd option we are getting following error


Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://koutilya999.freshdesk.com' is therefore not allowed access. The response had HTTP status code 405


i am attaching my whole fresh desk app as .zip


I want really help on this please i am stuck and need to meet dead lines


Thanks in advance for your help in advance.

zip
(29.7 KB)

You can solve the 1st problem easily. You need to add an exception in Chrome to allow HTTP communication with development server because page is loaded with HTTPS. I believe that you can do that in request history in web inspector but I'm not 100% sure. I've had the same problem as well. There should add some note about this in documentation.

Thanks for giving the solution to the first issue Martin. We have updated the documentation to alert developers about this.

Login or Signup to post a comment
JS Bin