Hello!
I am facing the issue 400 “Error while substituting the templates” .
The above error occurs at frontend APP. When I am about call(GET) the conversation of the ticket and agent details through Request API, I am getting the above error. It was working fine before but right now the API request is not working in the frontend APP.
- It works on my local environment , In fact i hit multiple times my validation process after and before the installation it works perfectly.
- After complete testing of the APP in Local environment, I have deployed the APP in production where the API request is not working and throughs error message like 400 “Error while substituting the templates”.
MY TRIES
I have visited the community for the solution. Unfortunately not able fix the issue.
SAMPLE CODE
//Get Agent Details
function getAgent()
{
var headers1={ “Authorization”: “Basic <%= encode(iparam.api_key) %>”,
‘Content-Type’: ‘application/json’
};
var options={
‘headers’:headers1
};
var url=https://${window.azure_domain}/api/v2/agents/me
;
client.request.get(url,options)
.then (function(body) {
if(body)
{
console.log("Agent...body response",body);
}
}).catch(err=>{
console.error(err);
})
}
DEBUG LOG
Thanks!