We'd like to create a dropdown input on a "Custom Installation Page" populated by "ticket type" options. This is a system field, but the options for it can be customized by admins. So rather than assuming they're the default "ticket type" options, we'd like to look up the values using the REST API and populate it with those. That way the options are always up-to-date and accurate.
The problem we're running into is there doesn't appear to be an easy way to make this API call. When using `client.request`, it doesn't matter whether you're calling Freshdesk or some random third-party domain. You still need the complete URL and a way to authenticate with it. And it seems the only way to get that is by making the user manually enter it.
I guess I'm having a hard time believing that if you want to make a call from a Freshdesk app to the Freshdesk API, using the Freshdesk client library, it requires a human to manually enter a bunch of info that the system should already have. What am I missing??
Thanks for reaching out to us with your question.
It is unfortunately true that the current custom install page does indeed expect a human to first enter the Freshdesk domain-name and API key, before client.request can be successfully used to fetch the ticket types for the given account. We realize this is a sub-par experience.
The good news is that we have started working on making this easier through our updated App Gallery experience. This is unfortunately only available right now for Freshsales (see https://developer.freshsales.io/docs/custom-installation-page/, and search for "data-bind"). We will soon migrate Freshdesk to this updated Gallery as well, and the same feature will then be available for apps built for Freshdesk.
Do let us know how we could help you further in the meanwhile.
Thanks for the reply. Glad to hear this is something that's planned. Any idea how soon it will be available for Freshdesk apps?
I've just looked at the custom installation page, how do you handle the "secure" of an iparm item? It could be just a documentation issue.
Chris, we are planning to have this rolled out for Freshdesk early next year (2019). You can keep an eye out for updates through our Blog - https://medium.com/freshworks-developer-blog
There is only one thing special with respect to handling a secure iparam in a custom installation page. In the JSON response sent back with the https://developer.freshdesk.com/v2/docs/custom-installation-page/#postconfigs call, the secure iparam is expected to carry an additional "secure" meta-tag.
Perhaps the related blog post will help you - https://medium.com/freshworks-developer-blog/securing-sensitive-installation-parameters-3879908ade17
Do let us know if we can help you further.
Start your 30-day free trial. No credit card required. No strings attached.Start Free Trial