Crovly

Integration

Add Crovly to any website or framework.

HTML

The simplest integration. Add the script tag and a container div.

<script src="https://get.crovly.com/widget.js"
        data-site-key="YOUR_SITE_KEY"
        data-theme="auto"></script>

<form action="/submit" method="POST">
  <input type="email" name="email" required />
  <div id="crovly-captcha"></div>
  <button type="submit">Submit</button>
</form>

<!-- Widget injects a hidden input named "crovly-token" -->

Backend Verification

After the widget verifies the user, your backend must validate the token. Use one of the official SDKs:

LanguagePackageInstall
Node.js@crovly/nodenpm install @crovly/node
PHPcrovly/crovly-phpcomposer require crovly/crovly-php
Pythoncrovlypip install crovly

Or call the API directly:

const res = await fetch('https://api.crovly.com/verify-token', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    token: formData.get('crovly-token'),
    expectedIp: req.ip,
  }),
});

const { success, score } = await res.json();
if (!success) {
  // reject the request
}

Framework SDKs

FrameworkPackageGuide
React / Next.js@crovly/reactReact SDK
Vue / Nuxt@crovly/vueVue SDK
WordPressPluginWordPress

React / Next.js

npm install @crovly/react
import { CrovlyCaptcha } from '@crovly/react';

function ContactForm() {
  const [token, setToken] = useState<string | null>(null);

  return (
    <form onSubmit={handleSubmit}>
      <CrovlyCaptcha
        siteKey="YOUR_SITE_KEY"
        onVerify={(token) => setToken(token)}
      />
      <button type="submit" disabled={!token}>Submit</button>
    </form>
  );
}

See the full React SDK docs for hooks, Next.js App Router, and TypeScript types.

Vue 3 / Nuxt

npm install @crovly/vue
<script setup>
import { ref } from 'vue';
import { CrovlyCaptcha } from '@crovly/vue';

const token = ref(null);
</script>

<template>
  <form @submit.prevent="handleSubmit">
    <CrovlyCaptcha site-key="YOUR_SITE_KEY" @verify="(t) => token = t" />
    <button type="submit" :disabled="!token">Submit</button>
  </form>
</template>

See the full Vue SDK docs for composables, Nuxt 3, and TypeScript types.

PHP

composer require crovly/crovly-php
use Crovly\Crovly;

$crovly = new Crovly('crvl_secret_YOUR_API_KEY');
$result = $crovly->verify($_POST['crovly-token'], [
    'expectedIp' => $_SERVER['REMOTE_ADDR'],
]);

if (!$result->isHuman()) {
    die('Captcha verification failed');
}

See the full PHP SDK docs for Laravel integration and error handling.

Python

pip install crovly
from crovly import Crovly

client = Crovly("crvl_secret_YOUR_API_KEY")
result = client.verify(token, expected_ip=request.remote_addr)

if not result.is_human():
    return {"error": "Captcha failed"}, 403

See the full Python SDK docs for Django, Flask, FastAPI, and async usage.

WordPress

Install the Crovly WordPress plugin for automatic protection of login, registration, comments, and WooCommerce forms.

See the WordPress guide for setup instructions.

On this page