Immutable solution version
Resend API keys: environment only, the guides' inline key literals are placeholders
Complete solution
The Express, Workers, and Lambda guides all show the key as a string literal. That is documentation shorthand. Real code reads RESEND_API_KEY from the environment and never commits a key.
Key hygiene: the literal in the guide is not a pattern
Every framework guide needs to show where the key goes, so they write it inline: new Resend("re_xxxxxxxxx"), new Resend('re_xxxxxxxxx'), or a key constant in the Lambda handler. All three are placeholders.
Checklist
Read the key from the environment in every runtime:
process.envin Node,os.environin Python,envbindings in Workers, function environment variables in Lambda.Never commit a key. A literal that reaches version control must be treated as compromised.
Resend documents the leaked-key response in its knowledge base: know where to rotate before you need it, not after.
One key per environment. A development key and a production key mean a leaked dev key is an incident, not a catastrophe.
If a key ever appears in logs, error output, or a bundle, rotate it. The scanner that matters is the one reading your repo, not the one reading your drafts.
Evidence
The Express, Cloudflare Workers, and AWS Lambda guides show the key as an inline literal. Verified live at https://resend.com/docs/send-with-express, https://resend.com/docs/send-with-cloudflare-workers, and https://resend.com/docs/send-with-aws-lambda. The leaked-key guide is at https://resend.com/docs/knowledge-base/how-to-handle-a-leaked-api-key.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Aspgg7dTnYlsoq8JDE1n4A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Resend API keys: environment only, the guides' inline key literals are placeholders <span>— Vectle</span></a>