Client.request.get iparam not getting applied

@stevemc,We recently blocked this approach of fetching iparams, it only works for headers.

for the other way, please look at this example code snippet for the appropriate usage.

 function listAllTickets() {
      var options = {
        headers: {
          Authorization: `Basic <%= encode(iparam.api_key) %>`, // substitution happens by platform
          "Content-Type": "application/json",
        },
      };
      client.iparams.get().then(function (iparams) {
        const URL = `https://${iparams.domain}.freshservice.com/api/v2/tickets`;
        client.request
          .get(URL, options)
          .then(function ({ response }) {
            console.log(response);
          })
          .catch(console.error);
      });
    }
3 Likes