Switch from reCAPTCHA or hCaptcha to nCAPTCHA
Switching from reCAPTCHA or hCaptcha to nCAPTCHA is easy. Below you can find a step-by-step guide to help with this upgrade.
Note: You don't have to update your callbacks or tag attributes. nCAPTCHA is API-compatible with reCAPTCHA and hCaptcha.
Get your nCAPTCHA site key and private key#
Signup or login on to the nCAPTCHA Panel
Go to the Sites tab in the dashboard and create a new site key.
Go to the Settings tab in the dashboard and copy your private key.
Update client-side integration#
1. Replace the script tag:
<script src="https://www.google.com/recaptcha/api.js"
async defer></script>
or
<script src="https://js.hcaptcha.com/api.js"
async defer></script>
becomes
<script src="https://js.ncaptcha.com/api.js"
async defer></script>
2. Replace the parameter name:
g-captcha
becomes
n-captcha
or
h-captcha
becomes
n-captcha
Update server-side integration#
Update secret key:
Use the secret key that you got in the first step.
Replace the field used from the form:
g-recaptcha-response
orh-captcha-response
, becomes
n-captcha-response
Update siteverify URL
https://www.google.com/recaptcha/api/siteverify
or
https://www.recaptcha.net/recaptcha/api/siteverify
or
https://api.hcaptcha.com/siteverify
becomes
https://api.ponta.co/verify
Invert score consumption (reCAPTCHA v3 or Enterprise to hCaptcha Enterprise only)
reCAPTCHA scores run from 0.0 (bot) to 1.0 (person). hCaptcha Enterprise scores are risk scores, and thus they run from 0.0 (no risk) to 1.0 (confirmed threat). See the hCaptcha Enterprise documentation on scores for more details. (Requires login to Enterprise account.) This means you should invert any score checks in your score consumption code.
If (score < threshold) Then [mitigate]
becomes
If (score >= threshold) Then [mitigate]
Switch from plugins/libraries#
pre-built nCAPTCHA integrations are available for virtually all platforms and frameworks.