I am trying to host an HTML form(build using Google AppScript) in Zendesk sidebar iframe. The form loads successfully. However I am facing issue with accessing the ZAF_sdk from
P.S : I have added this code in HTML file.
<script src="https://static.zdassets.com/zendesk_app_framework_sdk/2.0/zaf_sdk.min.js" crossorigin="anonymous"></script>
<script>
console.log("Hello, World!");
var client = ZAFClient.init();
client.get('ticket.requester.name').then(function(data) {
console.log(data);
});
client.get('ticket.requester.email').then(function(data) {
console.log(data);
});
client.get('ticket.id').then(function(data) {
console.log(data);
});
</script>
It gives error client.get is not a function
When I host the same code on our server, the sdk is properly loaded and all the functions are recognized and correct value is returned.
Is there a different way to load zaf_sdk in Google App Script webapp?
Thanks in advance.