Hi ,
I am facing an issue when developing a React FreshDesk App. I get the below error when using the client.request.get()
uncaught (in promise) TypeError: client.request.get is not a function
Code snippet below. -
useEffect( async () => {
const apiKey = "22fytwes0VwDCo9Jm22";
var options = {
headers: {
Authorization: `Basic <%= encode(${apiKey}) %>`, // substitution happens by platform
"Content-Type": "application/json",
},
};
client.iparams.get().then(function (iparams) {
const URL = `https://${iparams.domain}.freshdesk.com/api/v2/tickets`;
client.request
.get(URL, options)
.then(function ({ response }) {
console.log(response);
})
.catch(console.error);
});
}, [])
Can someone help me to resolve this issue?
Details-
"platform-version": "2.3",