| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/turnstile/migration/recaptcha/ | [Back] [Original] |
If you are using reCAPTCHA today, you can switch seamlessly to Cloudflare Turnstile by following the step-by-step guide below to assist with the upgrade process.
To complete the migration, you must obtain the sitekey and secret key.
Note
Turnstile migration is currently compatible up to reCAPTCHA v2.
Update the client-side integration by inserting the Turnstile script snippet in your HTML's <head> element.
<script
src="https://challenges.cloudflare.com/turnstile/v0/api.js?compat=recaptcha"
async
defer
></script>
Note
Adding ?compat=recaptcha runs Turnstile in compatibility mode, which
enables the following features:
g-recaptcha-response input name for formsgrecaptchaLocate the grecaptcha.render() calls and replace the sitekey with your Turnstile sitekey.
Note
Turnstile supports:
render() callexecute() callUpdate the server-side integration by replacing the Siteverify URL.
Replace https://www.google.com/recaptcha/api/siteverify with the following:
https://challenges.cloudflare.com/turnstile/v0/siteverify
Differences to reCAPTCHA's Siteverify
reCAPTCHA supports GET requests using query parameters, such as GET /siteverify?response=<response>&secret=<secret>.
Turnstile's Siteverify endpoint does not support this and only accepts POST requests with a FormData or JSON body.
Refer to server-side validation for more information.
| Web Proxy Viewer | New URL | Original Page |