I am trying to test an app that integrates FD with Youtrack.
I have a server that has Youtruck running on it, in which I would like to test calls to and from this server from my local Freshdesk app.
However, I am struggling to find out how to make these post requests.
One of my functions from my app.js is as follows:
var youtrackURL = "XX.XXX.X.XXX:XXXX"
function createET() {
var url = "https://${youtrackURL}/api/issues?fields=idReadable";
console.log(url);
var body = {
"project": {"id": "0-0"},
"summary": document.getElementById("summaryId").value,
"description": document.getElementById("descriptionId").value,
"customFields": [
{
"name": "Priority",
"$type": "SingleEnumIssueCustomField",
"value": document.getElementById("priorityId").value
},
{
"name": "Assignee",
"$type": "SingleUserIssueCustomField",
"value": document.getElementById("assigneeId").value
},
{
"name": "Subsystem",
"$type": "SingleUserIssueCustomField",
"value": "No Subsystem"
}
]
}
const options = {
headers: {
Authorization: `Basic <%= encode(iparam.YT_apiKey) %>`,
"Content-Type": "application/json"
},
body,
isOAuth: true,
method: "POST"
};
console.log(options);
client.request.post(url, options, body)
.then(
function(data) {
console.log(data);
},
function(error) {
console.log(error);
}
)
}
In the below topic, I can see that requests to IP addresses are not allowed, is this for all FD custom apps?
If so, how can I work around this? Can I simply add this IP to a hosts file in my app directory?
Below is my fdk.log file
fdk.log (1019.9 KB)
Also, for further details on my application make-up, I have raised a previous topic here: Failed to fetch installation parameters - #20 by Raviraj - App Platform - Freshworks Developer Community
Any help would be greatly appreciated, thanks!