Keys / OpenWeather
OPENWEATHER_API_KEY
The API key your app sends as the appid parameter on every OpenWeather API call.
- Expires
- the docs don't say
- API
- none; account page only
Get it
Create one on home.openweathermap.org/api_keys. The steps aren't recorded yet.
Set it
OPENWEATHER_API_KEY=...
OpenWeather has no official SDK that reads it; your app adds the key to each request as appid. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- On the API keys page of your account, create a new key. All keys on the account share the same plan and call limits.
- A new key can return
401until it's activated, within a couple of hours. Once it works, deploy it everywhere that readsOPENWEATHER_API_KEY. Both keys work in the meantime. - Check that nothing still uses the old key, then delete it. The account must keep at least one key.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.