# How to pass the API key to Openweathermap node

**URL:** <https://discourse.nodered.org/t/how-to-pass-the-api-key-to-openweathermap-node/12567>\
**Category:** General\
**Created:** [25 June 2019 07:47 UTC](https://discourse.nodered.org/t/how-to-pass-the-api-key-to-openweathermap-node/12567 "2019-06-25T07:47:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvargasevans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mvargasevans/32/7990_2.png) [@mvargasevans](https://discourse.nodered.org/u/mvargasevans)\
**Post date:** [25 June 2019 07:47 UTC](https://discourse.nodered.org/t/how-to-pass-the-api-key-to-openweathermap-node/12567/1 "2019-06-25T07:47:08Z")

</div>

Hello everyone,

I've been using Node-Red for a while with great ease.  
Thanks to the developers!

Here's a, probably easy question:  
What is the best way to pass the API Key to the openweathermap node in a way that it can be read automatically, regardless of restarts where sometimes the typed api key is lost?

Regards

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [25 June 2019 07:55 UTC](https://discourse.nodered.org/t/how-to-pass-the-api-key-to-openweathermap-node/12567/2 "2019-06-25T07:55:10Z")

</div>

once entered the key should not be lost. Do you have any logs, or can you shed any light on to how that came to happen ?

---

<div class="post-metadata">

**Author:** ![mvargasevans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mvargasevans/32/7990_2.png) [@mvargasevans](https://discourse.nodered.org/u/mvargasevans)\
**Post date:** [25 June 2019 09:00 UTC](https://discourse.nodered.org/t/how-to-pass-the-api-key-to-openweathermap-node/12567/3 "2019-06-25T09:00:09Z")

</div>

Hi dceejay,

Thanks for the reply!  
You are correct, once entered it is not lost.  
However, I would like to know if the entering step could be changed by pre-setting the key somewhere.
