api_key template replacement fails

  • 8 December 2022
  • 3 replies



The template replacement code does not work for our custom app.

let options = {
headers: {
Authorization: "Basic <%= encode(iparam.api_key) %>",
'Content-Type': 'application/json'


•    "Error while substituting the templates"
•    status: 400
•    errorSource: "APP"

We would appreciate your insights on what we’re missing.

The `options` are used when using `client.request.get`.

3 replies

Userlevel 7
Badge +14

Hello @cardboard, this looks correct and matches some code that I have utilized in production. I would suggest taking this over to the developer community, here, if you haven’t already. There, we can troubleshoot the issue and get it in front of the DevRel team to take a look at it.

Take care.


`api_key` should have been `apiKey`. That fixed the problem. Compare the key in your iparams.json vs the key you use in the code itself.


I was trying to use the template replacement code for our custom app but it doesn't seem to work. When I executed the code, I got the following error message: "Error while substituting the templates", along with the status code of 400 and the error source being "APP".

I am hoping to get some guidance from you on what could be the issue. The options variable is used when using client.request.get. Our app is related to Poquoson Replacement.

Any help or insights on this would be much appreciated. Thank you.