Keys / hCaptcha
HCAPTCHA_SECRET
The siteverify secret your server sends with each hCaptcha token to check that a user passed the challenge. The sitekey is the public half.
- Expires
- the docs don't say
- API
- none on free and Pro plans; Enterprise has a key rotation API
Get it
Create one on dashboard.hcaptcha.com/settings. The steps aren't recorded yet.
Set it
HCAPTCHA_SECRET=...
No official hCaptcha library reads it; your app passes it in, as the Go library's README does with HCAPTCHA_SECRET. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- In the dashboard's Settings, click Generate New Secret and copy it. Free accounts can do this once a day, Pro accounts 3 times.
- The docs don't say whether the old secret keeps working. Plan for siteverify calls with it to fail.
- Deploy the new secret everywhere that reads
HCAPTCHA_SECRET.
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.