Hi there,
I was trying to make a Freshdesk app. I need to get data through a REST API. I need that REST API Response to be showed in the app.js file. I have changed the Whitelisted Domains in the manifest folder as well. Some times, I am getting an error saying " The domain has not been white-listed", sometimes, I am getting “Error While Substituting the templates”. Below shows the code that I used to get the data from an API. Could you guys please help me with this?
app.js
============= Start ====================
Any URL used in your application to make API calls has to be whitelisted in manifest.json therefore please add “https://www.tools.com” as well in your whitelisted-domains list.
It looks like a error returned from “www.tool.com” in response to your request (i.e. Invalid Request). Can you try running the request using postman or curl to see if the request is working?
@Sachin_Kumar,
Thank you for letting me know that API is showing their. This is just a testing environment. I will change those credentials after this is done. Any way, Yes I am using API Authentication as you can see in my CURL. I have removed it and tested out. This is my new code. I am getting client.request is not a function error now.
================= Start ====================
var client;