Getting-error-while-substituting-templates-with-non-freshworks-api

Hi,
I am trying to work with a non-freshwork api that uses the secure api-key in query params
I always get this error 400 “error while substituting templates.”

Here is the manifest.json:

iparams.json:

Screenshot 2024-10-03 090338

requests.json:

image

app.js

Please help me out , I am stuck with this issue for a while now

Hey @Rupali,
Welcome to the Freshworks Developer Forum! :tada:

In query, we support non-secure iparams only - Freshworks Developer Docs | Use request method to place secure HTTP calls

Hi @zach_jones_noel
Thanks for the suggestion,
Currently if I don’t mention the apiKey in query params I always get authorization error for the api call.
I have tried to work this out by removing secure:true from iparams.json, but it didn’t help.

I am getting this error:
Screenshot 2024-10-03 101022

Hi @Rupali

Can you hardcode the API key in your request.json file and test the request again? If it works, that confirms the issue is with how the key is being passed dynamically. If it works, try this next approach:

<%= encode(iparam.apiKey) %>