Hi Team,
I try to implement the requests template functionality in a custom application (serverless application), but I facing an Unauthorized issue (401).
can anyone help me to sort out this issue.
Issue screenshot:
./config/requests.json
{
"getTickets": {
"schema": {
"method": "GET",
"host": "<%= iparam.domain %>.freshdesk.com",
"path": "/api/v2/tickets",
"headers": {
"Authorization": "Basic <%= encode(iparam.apikey) %>",
"Content-Type": "application/json"
}
},
"options": {
"retryDelay": 1000
}
}
}
Iparams.json
{
"apikey": {
"display_name": "API key",
"description": "Please enter your account’s API key",
"type": "text",
"data-bind": "product.api_key",
"required": true
},
"domain": {
"display_name": "Product Domain",
"description": "Please enter your account’s Domain",
"type": "text",
"data-bind": "product.domain",
"required": true
}
}
manifest.json
{
"platform-version": "2.3",
"product": {
"freshdesk": {
"events": {
"onTicketCreate": {
"handler": "onTicketCreateHandler"
}
},
"requests": {
"getTickets": {}
}
}
},
"engines": {
"node": "14.21.1",
"fdk": "8.6.7"
}
}