Iparams.json not working as expected

Hi @channel,

Can anyone correct me if am wrong?

As am using the iparams.json just for validating the API and subdomain even if am using the correct credentials am getting Api and subdomain mismatch errors.

For reference, I have shared the sample code and screenshots.

{
  "domainName": {
    "display_name": "Domain Name",
    "description": "Please enter your domain name",
    "type": "domain",
    "type_attributes": {
      "product": "freshworks_crm"
    },
    "required": true
  },
  "apiKey": {
    "display_name": "API Key",
    "description": "Please enter your api_key",
    "type": "api_key",
    "secure": true,
    "required": true,
    "type_attributes": {
      "product": "freshworks_crm"
    }
  }
}

Thanks

Hi @Anish ,

Good day!

As a first step please verify the domain & API key provided are valid (API key need to be taken from user → profile settings → Your API key).

Make sure to add whitelisted domain in the manifest.json

"whitelisted-domains" : [ "https://*.freshdesk.com"]

If the issue found to be not resolved, please share us the HAR logs with us to debug this further.

Thanks

1 Like

Thanks for that I missed it.

Having another doubt does the iparm.json validates if we enter the wrong API key and vice versa?

Because sometimes it’s validating and sometimes it fails to validate and saves the value i.e even when I enter the wrong API key on clicking the install button it saves the value.

But the expected flow is to prevent installing and showing errors.

1 Like

Hi @Anish ,

If the type is ‘api_key’ it will be validated for sure. It shouldn’t be sporadic. If you notice it in future, provide us with some more details like what you notice in network log & if any in browser console.

Thanks

1 Like

Sure @mariappan ,

Will be sharing a video recording, you can refer to the below URL and also the network logs.

Video link

HAR FILE:
localhost.har (1.9 MB)

Hi @Anish ,

Thanks for sharing the above references with us. This looks little weird, let me check the HAR logs little deeper and get back to you if any.

To my understanding, Based on the value of type_attributes.product, not only is the styling taken care, the validation is also done accordingly. So it should be validated if you’ve given type_attributes in iparams.json.

I’m also sharing a detailed reference here describing the various ways to validate API keys just to add more clarity & unblock - Various ways to validate API keys in the iparams page

Thanks

Hi @mariappan ,

I have tried the cases you have shared for the iparams.json even the same issue persists again.

Kindly help me to overcome this issue.

Thanks

Hi Anish,

Could you please elborate more about these issue!!

Looking for your response

Hi @mariappan ,

Is there anything required from my end?

What have you tried? Can you share the app zip here?

Thanks

HI @mariappan,

It’s the same that you have shared above.

For reference, you can check with the zip attached below.

sample ui app.zip (4.4 KB)

Hi @Anish ,

Good day!

Sorry for the delay in getting back. I’ve checked this issue deeper with the team & we identified the root cause.

First thing, from your screenshot & video recording we can understand you’re trying to validate in custom config page http://localhost:10001/custom_configs. Actually, it’s a bug occurring only in CRM accounts. You’d not notice the same in freshdesk/freshsales account.

We’re actually planning to deprecate this custom installation feature soon. Going forward you’ll be testing the same via gallery as below.

  1. Log in to your CRM account → navigate to gallery → Manage apps
  2. Go to custom apps tab → scroll to the end & you should see your active custom app running in local with a in dev tag (refer screenshot below). Click on install & that should land you in the installation page.

Since we’re planning to deprecate the earlier flow & enforce this in upcoming fdk release we did not take steps to add features to the custom installation standalone flow.

How this impacts your app & fix for the same?

As mentioned above, you’d notice this inconsistent behaviour in both the flows only in CRM accounts. Please publish your custom app & check the same it would validate as expected. Hope it shouldn’t be a blocker as the issue resides only on the local installation flow.

This would be fixed in the upcoming FDK release (currently in beta) and you’d be notified with a brief community post in our forum soon.

I’ll also specifically tag once that is available back in this thread.

Hope this helps! Let me know if you have any more question around the same.

Thanks

2 Likes