FCaptcha hosted by WebDecoy
WebDecoy runs FCaptcha for you at https://fcaptcha.webdecoy.com. You add the widget to your form, your server checks each token with WebDecoy, and you run nothing else yourself. Every plan includes it, Free too.
Use it when you want FCaptcha on a signup, login, contact or checkout form and would rather not operate the FCaptcha server. If you want to run it yourself, FCaptcha is open source; see the self-hosted quickstart and Move to your own server.
Set it up
Section titled “Set it up”- Sign in at app.webdecoy.com and pick your site in the site switcher, top left.
- Open FCaptcha in the navigation and select Connect.
- Copy the secret (it starts with
fcs1.) and store it on your server, for example as an environment variable namedFCAPTCHA_SECRET. It is shown once. Never put it in page code. - Copy the site key (it starts with
fck_). It is public and goes in your page code. - Check Allowed on. The widget only runs on these hostnames. See Allowed hostnames.
- Add the widget to your page. See Add the widget.
- Verify every token on your server. See Verify tokens on your server.
- Submit your form a few times and check your server logs. Your site starts in observe mode, so no visitor is turned away while you confirm the setup.
- When your checks look right, select Enforce on the FCaptcha page.
If you lose the secret, select Show secret on the FCaptcha page. Each time it is shown is recorded in your organization’s audit log.
Allowed hostnames
Section titled “Allowed hostnames”The widget runs on your site’s address and on the site’s other addresses from site settings. Each one is allowed in its apex form and its www form, for example example.com and www.example.com. No other subdomain is allowed.
Pages on any other domain are refused, and so are tokens minted there. That includes staging subdomains and localhost, unless they are one of the site’s addresses. To add an address, edit the site in site settings. The change takes effect within about a minute.
Add the widget
Section titled “Add the widget”Load the script, point it at WebDecoy and render the widget inside your form:
<script src="https://fcaptcha.webdecoy.com/fcaptcha.js"></script>
<form action="/submit" method="POST"> <!-- your fields --> <div id="captcha"></div> <button type="submit">Send</button></form>
<script> FCaptcha.serverUrl = 'https://fcaptcha.webdecoy.com'; FCaptcha.render('captcha', { siteKey: 'fck_YOUR_SITE_KEY' });</script>When the visitor passes, the widget adds a hidden field named fcaptcha_token to the form, and the form submits it with your other fields.
FCaptcha.render takes the element or its id, and these options:
| Option | Default | What it does |
|---|---|---|
siteKey |
none | Your fck_ site key. Required. |
theme |
'light' |
'light' or 'dark'. |
lang |
detected | Widget language. Without it, the widget uses the element’s data-lang, then the page’s <html lang>, then the browser. |
strings |
none | Your own wording for the widget’s labels. |
callback |
none | Called with the token when the visitor passes. |
errorCallback |
none | Called with the reason when verification fails or errors. |
expiredCallback |
none | Called when an unused token expires and the widget resets. |
responseField |
true |
Set false to skip the hidden form field. |
responseFieldName |
'fcaptcha_token' |
Name of the hidden form field. |
A token is valid for five minutes and can be used once. The callback only means the browser got a token. It does not authorize anything. Your server must verify the token.
Content Security Policy
Section titled “Content Security Policy”If your site sends a Content Security Policy, the widget needs these directives:
| Directive | Value | Why |
|---|---|---|
script-src |
https://fcaptcha.webdecoy.com |
Loads fcaptcha.js. |
connect-src |
https://fcaptcha.webdecoy.com |
The widget fetches its challenge and sends its verification request to this origin. |
worker-src |
blob: |
The widget solves its proof of work in Web Workers created from blob: URLs. Without this, verification cannot finish. |
style-src |
'unsafe-inline' |
The widget adds an inline <style> element and one inline style attribute. Without this, it still works but is not styled. |
For example:
script-src 'self' https://fcaptcha.webdecoy.com;connect-src 'self' https://fcaptcha.webdecoy.com;worker-src 'self' blob:;style-src 'self' 'unsafe-inline';If your policy has no worker-src, browsers fall back to child-src and then script-src, so blob: must be allowed in whichever one applies. The widget needs no frame-src, img-src, font-src or 'wasm-unsafe-eval', and it does not use eval.
Verify tokens on your server
Section titled “Verify tokens on your server”Send a POST to https://fcaptcha.webdecoy.com/siteverify with:
| Field | Required | Value |
|---|---|---|
secret |
Yes | Your fcs1. secret. |
response |
Yes | The fcaptcha_token value from the form. |
remoteip |
No | The visitor’s IP address. Send it only if you are sure it is the real visitor address, not a proxy’s. |
idempotency_key |
No | Any unique string per submission. A retry with the same key and token gets the first answer back instead of failing as a reused token. |
The body can be form-encoded or JSON. Accept the submission only when:
- the response has
"success": true, and hostnameis one of your own hostnames.
In observe mode, a failed check also answers "success": true, with a non-empty error-codes list and an empty hostname. The examples below accept those and log them, which is what observe mode is for. Once you switch to enforce, failed checks answer "success": false and the examples reject them.
Each example uses a 5-second timeout and treats any error, timeout or unreadable answer as “could not verify”. Never accept a submission you could not verify. See When verification fails or is unavailable.
Use this to test a token by hand. It exits non-zero unless the token verifies for one of your hostnames:
curl --silent --show-error --max-time 5 \ --data-urlencode "secret=$FCAPTCHA_SECRET" \ --data-urlencode "response=$FCAPTCHA_TOKEN" \ https://fcaptcha.webdecoy.com/siteverify \| jq -e '.success == true and (.hostname == "example.com" or .hostname == "www.example.com")'In observe mode, a token that would be rejected shows "would_reject": true and fails this check, because its hostname is empty.
Node.js
Section titled “Node.js”Node.js 18 or later:
const VERIFY_URL = 'https://fcaptcha.webdecoy.com/siteverify';const EXPECTED_HOSTS = ['example.com', 'www.example.com'];
// Returns 'ok', 'rejected' or 'unavailable'.export async function verifyFCaptcha(token) { let data; try { const res = await fetch(VERIFY_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ secret: process.env.FCAPTCHA_SECRET, response: token }), signal: AbortSignal.timeout(5000), }); if (!res.ok) return 'unavailable'; data = await res.json(); } catch { return 'unavailable'; }
if (data.success !== true) return 'rejected';
const codes = data['error-codes'] ?? []; if (data.mode === 'observe' && codes.length > 0) { console.warn('FCaptcha observe mode, would reject:', codes); return 'ok'; }
return EXPECTED_HOSTS.includes(data.hostname) ? 'ok' : 'rejected';}<?php// Returns 'ok', 'rejected' or 'unavailable'.function verify_fcaptcha(string $token): string{ $expectedHosts = ['example.com', 'www.example.com'];
$ch = curl_init('https://fcaptcha.webdecoy.com/siteverify'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query([ 'secret' => getenv('FCAPTCHA_SECRET'), 'response' => $token, ]), CURLOPT_RETURNTRANSFER => true, CURLOPT_CONNECTTIMEOUT => 3, CURLOPT_TIMEOUT => 5, ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status !== 200) { return 'unavailable'; } $data = json_decode($body, true); if (!is_array($data)) { return 'unavailable'; }
if (($data['success'] ?? false) !== true) { return 'rejected'; }
$codes = $data['error-codes'] ?? []; if (($data['mode'] ?? '') === 'observe' && $codes) { error_log('FCaptcha observe mode, would reject: ' . implode(',', $codes)); return 'ok'; }
return in_array($data['hostname'] ?? '', $expectedHosts, true) ? 'ok' : 'rejected';}Python
Section titled “Python”Uses the requests package:
import loggingimport os
import requests
VERIFY_URL = "https://fcaptcha.webdecoy.com/siteverify"EXPECTED_HOSTS = {"example.com", "www.example.com"}
def verify_fcaptcha(token: str) -> str: """Returns 'ok', 'rejected' or 'unavailable'.""" try: res = requests.post( VERIFY_URL, data={"secret": os.environ["FCAPTCHA_SECRET"], "response": token}, timeout=5, ) res.raise_for_status() data = res.json() except (requests.RequestException, ValueError): return "unavailable"
if data.get("success") is not True: return "rejected"
codes = data.get("error-codes") or [] if data.get("mode") == "observe" and codes: logging.warning("FCaptcha observe mode, would reject: %s", codes) return "ok"
return "ok" if data.get("hostname") in EXPECTED_HOSTS else "rejected"What the answer looks like
Section titled “What the answer looks like”A token that passes, in enforce mode:
{ "success": true, "challenge_ts": "2026-11-23T15:04:05.000Z", "hostname": "www.example.com", "action": "", "cdata": "", "error-codes": [], "score": 0.12, "mode": "enforce"}A token that would be rejected, in observe mode:
{ "success": true, "challenge_ts": "", "hostname": "", "action": "", "cdata": "", "error-codes": ["timeout-or-duplicate"], "score": null, "mode": "observe", "would_reject": true}The same token in enforce mode answers {"success": false, "error-codes": ["timeout-or-duplicate"], "mode": "enforce"}.
score is FCaptcha’s risk score, where lower is more human.
Error codes
Section titled “Error codes”| Code | Meaning |
|---|---|
missing-input-secret |
No secret was sent. Fails in every mode. |
invalid-input-secret |
The secret is wrong, rotated out, or the site was disconnected. Fails in every mode. |
missing-input-response |
No token was sent. |
invalid-input-response |
The token is not valid: malformed, for another site, or minted on a hostname that is not allowed. |
timeout-or-duplicate |
The token expired or was already used. |
capacity-exceeded |
The site is past its monthly limit. See Usage and limits. |
bad-request |
The request body could not be read. |
diagnostic-token |
The setup test token was sent. See Test your setup. Always fails, in every mode. |
Other verification paths
Section titled “Other verification paths”Code written for Turnstile or reCAPTCHA can keep its request shape and change only the URL:
https://fcaptcha.webdecoy.com/turnstile/v0/siteverifyhttps://fcaptcha.webdecoy.com/recaptcha/api/siteverify. Herescorefollows reCAPTCHA’s direction, where 1.0 is human, and FCaptcha’s own score is infcaptcha_score.
FCaptcha’s native endpoint, https://fcaptcha.webdecoy.com/api/token/verify, also accepts your secret. It takes token and secret as JSON and answers with valid instead of success. Its fields are described on Integrate and verify tokens.
Test your setup
Section titled “Test your setup”Before real visitors arrive, check that your server can reach FCaptcha with the right secret. Send the test token fcaptcha-diagnostic from your server:
curl -s https://fcaptcha.webdecoy.com/siteverify \ -d secret=YOUR_SECRET \ -d response=fcaptcha-diagnosticThe answer is always "success": false with diagnostic-token in error-codes, in observe and enforce mode, so the test token can never get a submission through your form. It does not count toward your usage. The FCaptcha page shows Setup test passed within about two minutes.
A passed setup test shows that your secret and network path work. It does not show that your form checks tokens. That shows up as Live verification once real submissions arrive.
When verification fails or is unavailable
Section titled “When verification fails or is unavailable”Treat a timeout, a network error, a non-200 status or an unreadable answer as “could not verify”. Never accept the submission in that case, even if the visitor passed the widget.
Instead:
- keep what the visitor typed, so they do not have to start over;
- show a message that says the check could not be completed and asks them to try again;
- offer another way to reach you, such as an email address or phone number.
When a token is rejected, reset the widget with FCaptcha.reset(widgetId), using the id that FCaptcha.render returned, so the visitor can try again with a new token. A token cannot be reused. If you retry a verification request after a timeout, send the same idempotency_key with the same token.
When the widget refuses a visitor
Section titled “When the widget refuses a visitor”The widget can refuse a person it scores as automated. It shows “Verification failed” and resets after a few seconds so they can try again, but it offers nothing else. A person who keeps being refused, for example someone using assistive technology, a privacy extension or an unusual browser, has no way through unless your page gives them one.
Use errorCallback to show that way through:
<p id="captcha-help" hidden> Having trouble with the check? Email us at [email protected] and we will handle your request.</p>
<script> FCaptcha.render('captcha', { siteKey: 'fck_YOUR_SITE_KEY', errorCallback: () => { document.getElementById('captcha-help').hidden = false; }, });</script>errorCallback runs for a refusal and for a network error, so one handler covers both. Keep what the visitor typed, and do not make them pass the check to use the other way to reach you. Set this up before you switch to enforce: in observe mode no one is turned away, but in enforce mode a refused visitor cannot submit the form.
Observe and enforce
Section titled “Observe and enforce”New sites start in observe mode.
- Observe: a failed check still answers
"success": true, with"mode": "observe","would_reject": trueand the realerror-codes. No visitor is turned away while you confirm your setup. A wrong or missing secret still fails. - Enforce: a failed check answers
"success": false, so your server rejects it.
Observe mode is for checking your setup. It does not protect your form, because every token is accepted. Switch to enforce once your server logs show the results you expect: real submissions pass, and would_reject appears only where you expect it.
To switch, select Enforce or Switch to observe on the FCaptcha page. The change takes effect within about a minute. You can switch back at any time.
Usage and limits
Section titled “Usage and limits”Only successful server verifications count. Widget loads and failed checks do not. A retry answered from an idempotency_key does not count again.
Each site has a monthly allowance, counted per UTC calendar month:
| Plan | Verifications per site per month |
|---|---|
| Free | 10,000 |
| Starter | 50,000 |
| Pro, and trials | 250,000 |
| Agency | 1,000,000 |
The FCaptcha page shows this month’s usage, updated about once a minute.
- Over the allowance: verification keeps working, and the FCaptcha page shows a warning.
- At twice the allowance: in enforce mode, checks answer
"success": falsewithcapacity-exceededuntil the month resets. The token is not used up. In observe mode, checks answer"success": truewithcapacity-exceededinerror-codes.
There is no overage billing. To keep verifying, upgrade your plan or run FCaptcha on your own server.
Setup health and history
Section titled “Setup health and history”On every plan, the FCaptcha page shows the site’s setup health:
- Status: waiting for a first verification, setup test passed, verifying, failing (your server is calling but nothing passes), or quiet (no calls in the last 7 days).
- Setup test and Live verification on separate lines, each with when it last happened.
- Verified, rejected and error counts for the last 7 days.
These update about once a minute.
On Pro, Agency and trials, the page also shows verification history:
- Verified, rejected, unfinished and error totals for a date range, by day, filtered by action.
- Unfinished is a challenge the visitor passed whose token never reached your server before it expired. It is counted once the day has ended.
- Each rejection or error with its time, action, reason, and the mode it ran in. In observe mode a rejection reads “would have been rejected”.
History keeps counts for every check and a detail row only for rejections and errors. A passing visitor is only ever a count. Detail rows hold no IP address, browser details or form contents, and are deleted after your plan’s detail retention: 15 days on Free and trials, 90 days on Starter, a year on Pro and Agency.
Rotate or disconnect
Section titled “Rotate or disconnect”Rotate secret issues a new secret. The previous one keeps working for 24 hours, and the FCaptcha page shows when it stops. Update your server before then. The site key does not change.
Disconnect stops FCaptcha for the site. The site key and every secret stop working within about a minute. If you connect the site again, it gets a new site key and a new secret, so update your page code and your server.
Move to your own server
Section titled “Move to your own server”FCaptcha is open source under the MIT license: github.com/WebDecoy/FCaptcha. To move off the hosted service:
- Run your own FCaptcha server. Start with the self-hosted quickstart, then follow the upstream installation guide and hardening guide for production. Those cover the signing secret (
FCAPTCHA_SECRET), the verification secret (FCAPTCHA_VERIFY_SECRET), Redis for more than one instance (REDIS_URL) and allowed hostnames (FCAPTCHA_ALLOWED_HOSTNAMES). - In your page code, change the script URL and
FCaptcha.serverUrlto your server. - On your server, change the siteverify URL to your server and use its
FCAPTCHA_VERIFY_SECRETinstead of yourfcs1.secret. - Once your own server is verifying tokens, disconnect the site on the FCaptcha page.
The /siteverify request and answer have the same shape, so your verification code needs no other change. Your own server has no observe mode, so failed checks answer "success": false from the start.
Privacy and data handling
Section titled “Privacy and data handling”When you run FCaptcha on your own server, visitor data goes to your server and nowhere else. The hosted service is different: your visitors’ browsers send signals to WebDecoy, and your server sends their tokens to WebDecoy. Nothing is sent until you connect a site and add the widget, and it stops when you remove the widget or disconnect.
For your visitors’ data, you are the controller and WebDecoy processes it on your behalf under the data processing agreement. FCaptcha sets no cookies, but it does process personal data: an IP address and a description of a browser and device are personal data in many jurisdictions. Assess it under your own lawful basis.
Who receives it
Section titled “Who receives it”- WebDecoy LLC runs the verifier at
fcaptcha.webdecoy.com. - Railway hosts the verifier in the United States (US West). Its request logs record the IP address and User-Agent of each request to
fcaptcha.webdecoy.comand are kept under Railway’s log retention, up to 90 days. - Cloudflare sits in front of
fcaptcha.webdecoy.comand carries each request, including the IP address and User-Agent, through its edge network.
Both are listed on the subprocessors page. Hosted FCaptcha runs only in the United States. If you need processing in the EU or on your own infrastructure, run your own server.
The verifier makes no IP reputation, geolocation or advertising lookups. The one outbound request it can make is to fetch the public key directory that a signed AI agent names in its own request, to check its signature. That directory sees WebDecoy’s server, not your visitor.
What the widget sends
Section titled “What the widget sends”- Interaction: pointer and touch movement, click position, scrolling, and keyboard timing. For typing it sends when keys were pressed and how long they were held, and the length of a field, never which keys and never what was typed.
- Browser and device: screen and window size, platform, language, time zone, CPU count, memory, the graphics renderer, fonts, the User-Agent, and hashes of canvas, audio and layout rendering.
- Automation markers: signs of a driven browser, such as
navigator.webdriverand Chrome DevTools Protocol artifacts. - Your labels: the
actionyou set, and theidornameof a text area the visitor typed in. - The page hostname, read from the
OriginorRefererheader.
It never sends form field contents, passwords, cookies or page content. Your server sends the token and, if you choose, the visitor’s IP address as remoteip.
What WebDecoy keeps
Section titled “What WebDecoy keeps”| Data | Where | Kept for |
|---|---|---|
| Challenge, replay and rate-limit state, keyed on the visitor’s network address | Verifier memory only | 60 seconds to 15 minutes, and gone on restart |
| A hash of each answered token’s signature, to count unfinished challenges | Verifier memory only | 24 hours, and gone on restart |
| Daily counts per site, action and outcome | WebDecoy database | While the site exists |
| One row per rejection or error: time, action, reason, score, detection categories, mode | WebDecoy database | Your plan’s detail retention (15 days on Free and trials, 90 days on Starter, a year on Pro and Agency) |
| Monthly verification count per site | WebDecoy database | For billing |
| Request logs at Railway | Railway | Up to 90 days |
A visitor who passes is only ever a count. Rows for rejections and errors hold no IP address, User-Agent, device fingerprint, interaction data or form contents. Nothing is written to disk on the verifier.
Short-lived abuse counters apply across every hosted site, so a flood against one site is slowed on the others too. They live in memory for at most 15 minutes and are used for nothing else.
What WebDecoy does not do
Section titled “What WebDecoy does not do”- No cookies, local storage or persistent identifier in your visitor’s browser.
- No joining of FCaptcha data to WebDecoy bot detections or actor intelligence.
- No use of your visitors’ data for another customer, for advertising, or for training.
- No research capture or per-visitor verdict logging on customer sites. WebDecoy’s own demo can do both, with the visitor’s consent, and that is enforced in the verifier’s code.
How to stop
Section titled “How to stop”- Remove the widget from your pages. No visitor data is sent after that.
- Disconnect the site on the FCaptcha page. The site key and secret stop working within about a minute.
- Rejection and error rows are deleted on your plan’s schedule. To delete them sooner, or to delete the counts, email [email protected].
The public FCaptcha demo has its own research-consent rules, which do not apply to your site.