Error in using API in platform version 2.3

Hello Team,

The manifest.json file:

The request.json file:

The server.js file:

iparams.html file:

The error:

From server.js on ticket create event, I am trying to get all the ticket details using “https://example.freshservice.com/api/v2/tickets/ticketID” and getting an error.

Please let me know if I am making any mistake.

Regards,
Akhil S K

@kaustavdm

Please help me with this particular issue.

Hello Team,

Even after changing the request.json with the accurate iparam data, Still getting the same error.

I have checked the provided APPs and still not working as expected.

Regards,
Akhil S K

@Santhosh

Please help us here as the custom APP is already live in PROD and while updating, we are facing issues here.

Regards,
Akhil S K

  1. I don’t see an iparam named “domain” that you are setting in the postConfigs() function, based on the return value of that function. But the request template used “iparam.domain” in the template substitution for “host”. So, as iparam.domain is empty, the value of “host” becomes an empty string at runtime. To fix this, you will have to set an iparam with the same name: “domain”. Or, update the request template’s “host” to include the correct iparam based on what you set from postConfigs().

  2. You cannot dynamically set the value for “host” at runtime. So using “context” is not allowed in “host”.

Hope that helps

Hello Kaustav,

I have changed the domain as per the postConfigs() and tested it and still it is not working as expected.

Please check the last screenshot addded.

Regards,
Akhil S K

Hello Team,

I have reinstalled the nvm, fdk and the issue is resolved.

Thanks for the support.

Regards,
Akhil S K

1 Like

Glad to know it is resolved, Akhil. In these cases, deleting the ~/.fdk/ directory also does the trick.

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