Hello,
My request template was working, but it’s not any more. I am receiving “error while substituting templates” error
I believe the issue is due to iparam.server being used as “host” value. But this used to work before.
Please advise!
requests.json
{
"callWebapi2": {
"schema": {
"method": "POST",
"protocol": "https",
"host": "<%= iparam.server %>",
"path": "/webapi2?he=JSON1&<%= context.queryparams %>",
"headers": {
"Content-Type": "application/json"
}
}
}
}
manifest.json
{
"platform-version": "2.3",
"product": {
"freshdesk": {
"location": {
"ticket_sidebar": {
"url": "index.html",
"icon": "styles/images/icon.svg"
}
},
"requests": {
"callWebapi2": {}
}
}
},
"engines": {
"node": "18.16.0",
"fdk": "9.0.1"
},
"dependencies": {}
}
Invocation (app.js)
client.request.invokeTemplate("callWebapi2", {
context: {
queryparams: "method=utils/login/1"
},
body: data
})
iparams.json
{
"server": {
"display_name": "Server Address",
"description": "Enter Server Address",
"type": "text",
"required": true,
"default_value": "islonline.net",
"secure": false
}
}