Iparams domain and api_key validation

The documentation states:

The iparams of the domain and api_key types are validated when the app is installed.

But in local simulation I can never install the app, validation always fails. That would be okay if in production environment it worked, but it don’t. I can install once. If i try to edit the settings and save, validation fails and I can never update the app.

iparams.json

{
  "domain": {
    "display_name": "Product Domain",
    "description": "Please enter your account's Domain",
    "type": "domain",
    "type_attributes": {
      "product": "freshdesk"
    },    
    "required": true
  },

  "apikey": {
    "display_name": "API key",
    "description": "Please enter your account's API key",
    "type": "api_key",
    "type_attributes": {
      "product": "freshdesk"
    },    
    "required": true
  }
}

Error:

Is this really an issue or am I missing some configuration?

Hi @samuelpares

Have you whitelisted the Freshdesk domain in the app manifest? If not, please add the Freshdesk domain under whitelisted_domains of your app manifest file.
Refer below code snippet :
manifest.json

{
  "platform-version": "2.2",
  "product": {
    "freshdesk": {},
  }
  "engines": {
    "node": "12.22.1",
    "fdk": "7.0.1"
  },
  "whitelisted-domains": [
    "https://*.freshdesk.com"
  ]
}

Let me know if it’s still not fixed.

Regards,
Mughela Chandresh

3 Likes

@samuelpares,
In addition to @Mughela_Chandresh, if you added the whitelisting domain, and still getting an issue,
please share with us the console errors and HAR logs to debug further.

Thanks.

2 Likes

Yes, i guess it was it. Actually I kept building my app and eventuay I added the domain in whitelist. The error stopped happening, but I didn’t correlate it was it.
I guess it would be nice to mention this in the iparams documentation page, since it’s not me doing the validation, but the sdk, and it worked for the first install.

4 Likes

Ya sure @samuelpares

@Saif Can we check if this is added in the documentation else can we please update it?

3 Likes

Thanks for calling this out, @Mughela_Chandresh

Yes, I have shared the feedback with the Techwriting team.

3 Likes

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.