JSPM

verify-hcaptcha

3.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 58
  • Score
    100M100P100Q66609F
  • License MIT

A fully typed library to verify hCaptcha.com tokens submitted by users when solving captcha challenges

Package Exports

  • verify-hcaptcha
  • verify-hcaptcha/package.json

Readme

✅ verify-hcaptcha

Build status Coverage jsDocs.io Language npm License

A fully typed library to verify hCaptcha.com tokens submitted by users when solving captcha challenges.

[!WARNING] This is an unofficial library; we are not affiliated with hCaptcha.com.

Useful resources

Install

[!NOTE] Make sure you have Zod v4 installed in your application to use this package.

Using npm:

npm add zod verify-hcaptcha

Using yarn:

yarn add zod verify-hcaptcha

Using pnpm:

pnpm add zod verify-hcaptcha

Using bun:

bun add zod verify-hcaptcha

Usage Examples

Verify a token submitted by a user:

import { verifyHcaptchaToken } from "verify-hcaptcha";

const result = await verifyHcaptchaToken({
    token: "USER-SUBMITTED-RESPONSE-TOKEN",
    secretKey: "YOUR-SECRET-KEY",
    siteKey: "YOUR-SITE-KEY",
});

if (result.success) {
    console.log("User is human");
} else {
    console.log("User is robot");
}

License

MIT

Copyright (c) 2025 Edoardo Scibona

See LICENSE file.