How to set API KEY and Service Endpoint through environment variables for IBM Watson "Language Translator" node?

I would like to keep my IBM Watson credentials outside the node-red flow by setting them in environment variables.

The problem is that the watson translator node is not substituting ${XXX} by the contents of the environment variable XXX.

can you double check there are no whitespace or space characters before the $ and after the } and that the environment variable actually exists

Thanks a lot: that was indeed the first issue: It didn't exist.

The second issue I encountered when defining it: was that I had defined it as follows in my env file:

WATSON_LANGUAGE_TRANSLATOR_APIKEY="gYHe7_-....k_"

which is also not correct - it should be defined without the double quotes as follows:

WATSON_LANGUAGE_TRANSLATOR_APIKEY=gYHe7_-....k_

So when removing the double quotes in my env file it worked as a charm.

Thanks a lot !

1 Like

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