Skip to content

Migrate from hCaptcha

Seamlessly migrate from hCaptcha.

1. Getting your credentials

There are two credentials you will need to grab:

  • your sitekey (this will be public)
  • your secret key (this is private, never share it!)

Head to the Dashboard and go to Add site.

Follow the onboarding process on the site. Once you are through with it, you should be presented your sitekey and secret key. Make sure to write down your secret key, you won’t have a second chance to access it.

2. Migrating client-side integration

Switching is as easy as swapping out the script tag used to load hCaptcha with our special api.js that is compatible with hCaptcha. Simply replace https://js.hcaptcha.com/1/api.js with https://global.captcha.party/public/compat/hcaptcha.js

You’ll also need to replace all hCaptcha sitekeys with your Captcha.party sitekey OR you can add a sitekey to the hcaptcha.js script element, which will override all other sitekeys.

Any of the following ways will work:

  • <script src="[...]/hcaptcha.js?sitekey=<SITEKEY_HERE>">
  • <script src="[...]/hcaptcha.js#sitekey=<SITEKEY_HERE>">
  • <script src="[...]/hcaptcha.js" data-sitekey="<SITEKEY_HERE>">

3. Migrating server-side integration

To complete the migration, you will need to swap the siteverify URL used your backend and the secret key for accessing.

Replace https://hcaptcha.com/siteverify with https://global.captcha.party/api/v0/hcaptcha/siteverify.

Replace your old secret with your new secret.

// old
fetch("https://hcaptcha.com/siteverify", {
method: "POST",
body: new URLSearchParams({
response: "...",
secret: "secret",
}),
});
// new
fetch("https://global.captcha.party/api/v0/hcaptcha/siteverify", {
method: "POST",
body: new URLSearchParams({
response: "...",
secret: "secret",
}),
});