PHPackages                             codewithkyle/recaptcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. codewithkyle/recaptcha

ActiveCraft-plugin[Validation &amp; Sanitization](/categories/validation)

codewithkyle/recaptcha
======================

A simple craft plugin for validating Google's reCAPTCHA v3

1.1.1(7y ago)025MITPHP

Since Oct 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/codewithkyle/craft-recaptcha)[ Packagist](https://packagist.org/packages/codewithkyle/recaptcha)[ RSS](/packages/codewithkyle-recaptcha/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

[![Screenshot](resources/img/plugin-logo.png)](resources/img/plugin-logo.png)

reCAPTCHA v3 for Craft CMS 3
============================

[](#recaptcha-v3-for-craft-cms-3)

A simple craft plugin for validating Google's reCAPTCHA v3

Documentation
=============

[](#documentation)

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and tell composer to require the plugin `composer require codewithkyle/recaptcha`
2. In the Control Panel, go to Settings -&gt; Plugins and click the “Install” button for Recaptcha.

Configuring
-----------

[](#configuring)

Go to Settings -&gt; Plugins -&gt; reCAPTCHA for Craft -&gt; Settings. Paste your site and secret keys for [Google reCAPTCHA v3](https://www.google.com/recaptcha/admin).

Using recaptcha
---------------

[](#using-recaptcha)

1. Build your form element [eg: form](docs/form-sample.md)
2. Add your site key to the `` element with `data-key="{{ craft.recaptcha.getPublicKey() }}"`
3. In JavaScript we need the following variables:

- `form = document.body.querySelector('form');`
- `var key = form.getAttribute('data-key');`

1. Get Googles reCAPTCHA API with ``

- Or get the API when you need it [sample code](docs/get-api.md)

1. Execute `grecaptcha.execute` whenever users submit the form [sample code](docs/verification.md)
2. Based on the response do what you need to do

Verification Response Object
----------------------------

[](#verification-response-object)

When verifying a token the server will respond with a verification JSON object. When parsed it will appear like:

```
Object{
  action: "type",
  score: 0.9,
  status: 200,
  timestamp: "2018-08-03T19:48:00Z"
}

```

[Google's Documentation on Using Score](https://developers.google.com/recaptcha/docs/v3#score)

> reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot). Based on the score, you can take variable action in the context of your site.

[Google's Documentation on Using Actions](https://developers.google.com/recaptcha/docs/v3#score)

> reCAPTCHA v3 introduces a new concept: actions. When you specify an action name in each place you execute reCAPTCHA you enable two new features:
>
> - a detailed break-down of data for your top ten actions in the admin console
> - adaptive risk analysis based on the context of the action (abusive behavior can vary) Importantly, when you verify the reCAPTCHA response you should also verify that the action name matches the one you expect.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2760d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e107911d4c7d48147c697817079732637c91f101c1810a114fed53456baf637?d=identicon)[codewithkyle](/maintainers/codewithkyle)

---

Top Contributors

[![codewithkyle](https://avatars.githubusercontent.com/u/15202776?v=4)](https://github.com/codewithkyle "codewithkyle (1 commits)")

---

Tags

recaptchacmsCraftcraftcmscraft-plugin

### Embed Badge

![Health badge](/badges/codewithkyle-recaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/codewithkyle-recaptcha/health.svg)](https://phpackages.com/packages/codewithkyle-recaptcha)
```

###  Alternatives

[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.4M46](/packages/nystudio107-craft-seomatic)[verbb/image-resizer

Resize assets when they are uploaded.

127269.1k7](/packages/verbb-image-resizer)[elivz/vzurl

A URL fieldtype with validation.

4433.2k](/packages/elivz-vzurl)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[acclaro/translations

Easily launch and manage multilingual Craft websites without having to copy/paste content or manually track updates.

1229.5k](/packages/acclaro-translations)[verbb/footnotes

Adds a footnotes feature to CKEditor fields and Twig templates.

213.3k](/packages/verbb-footnotes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
