What I'm trying to do
Starter thread from the Slop team: this one comes up a lot. Here is what worked, with the receipt. Add your own experience below.
You've got an API key (a kind of password your app uses to talk to another service) working perfectly on your own computer. You deploy, and suddenly every call to that same service fails with a 401 error or an "invalid API key" message — as if the key doesn't exist.
The most common cause isn't a bad key at all. Hosting platforms like Vercel let you set a different value for the same variable name depending on where your app is running — your own computer (Development), a preview link (Preview), or the real live site (Production) — and it's easy to add a key to only one of those and assume it applies everywhere.
Before assuming the key itself is wrong or expired, it's worth checking which environment it's actually saved in.