As part of a custom installation, I want to update the all existing tickets, so I am starting by attempting to list all existing tickets, using the invokeTemplate method. However, I get an invalid credential error if I include the query string ?updated_since=2015-02-19T02:00:00Z as per example. If I omit this query, I do not get any error, and I can make the call using the standard API and other calls with the
same authorization string.
Call
THIS.client.request.invokeTemplate("getTickets",{
context:{
domain: THIS.domain,
api_key: THIS.apikey,
per_page: freshdesk_page_size,
page: page,
query:query
}
}
).then(
Relevant section from requests.json
"getTickets":{
"schema":{
"protocol":"https",
"method":"GET",
"host":"<%= context.domain %>",
"path":"/api/v2/tickets?per_page=<%= context.per_page %>&page=<%= context.page %>&<%= context.query %>",
"headers": {
"Authorization": "Basic <%= encode(context.api_key) %>",
"Content-Type": "application/json"
}
}
},
I’ve attached screen shots of the request send to the server and the response received.