Migrate from FriendlyCaptcha
Seamlessly migrate from FriendlyCaptcha.
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
This migration step depends on if you are using the widget script tag setup or
friendly-challenge
library.
Widget Script Tag
Switching is as easy as swapping out the script tag used to load FriendlyCaptcha
with our special api.js that is compatible with Turnstile. Simply replace the
script src (eg
https://cdn.jsdelivr.net/npm/friendly-challenge@<VERSION>/widget.module.min.js
)
with our https://global.captcha.party/public/compat/friendlycaptcha.js
script.
You’ll also need to replace all friendlycaptcha sitekeys with your Captcha.party
sitekey OR you can add a sitekey to the friendlycaptcha.js
script element,
which will override all other sitekeys.
Any of the following ways will work:
<script src="[...]/friendlycaptcha.js?sitekey=<SITEKEY_HERE>">
<script src="[...]/friendlycaptcha.js#sitekey=<SITEKEY_HERE>">
<script src="[...]/friendlycaptcha.js" data-sitekey="<SITEKEY_HERE>">
friendly-challenge library
Remove the import for WidgetInstance
and replace it with
window.friendlyChallenge.WidgetInstance
.
For example:
Additionally, you need to add our <script>
element to the <head>
of the
document:
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://api.friendlycaptcha.com/api/v1/siteverify
with
https://global.captcha.party/api/v0/friendlycaptcha/siteverify
.
Replace your old secret with your new secret.