{"id":28040,"date":"2026-11-17T11:39:41","date_gmt":"2026-11-17T11:39:41","guid":{"rendered":"https:\/\/capskip.com\/?p=28040"},"modified":"2026-11-17T11:39:41","modified_gmt":"2026-11-17T11:39:41","slug":"what-is-hcaptcha","status":"publish","type":"post","link":"https:\/\/capskip.com\/zh\/what-is-hcaptcha\/","title":{"rendered":"hCaptcha \u662f\u4ec0\u4e48\uff1fToken\u3001Siteverify \u4e0e Enterprise \u8be6\u89e3"},"content":{"rendered":"<p>hCaptcha is a bot check that you put in front of a form. The visitor passes a challenge in a widget, and the widget then adds a token named <code>h-captcha-response<\/code> to the form. Your server sends that token to hCaptcha to confirm it is real. So what is hCaptcha for a developer? It is a widget, a token and one verification call, and that is also what you handle if a script has to get through one. This guide covers how to recognise it, what the server checks, what each error means and what a script sends.<\/p>\n<p>For the general idea of a CAPTCHA, see <a href=\"https:\/\/capskip.com\/what-is-captcha\/\">what a CAPTCHA is and why sites use one<\/a>. This page stays on hCaptcha.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">How you recognise hCaptcha on a page<\/h2>\n<p><a href=\"https:\/\/docs.hcaptcha.com\/\" rel=\"noopener nofollow\" target=\"_blank\">The hCaptcha developer guide<\/a> shows the widget as an element of the class h-captcha that carries a data-sitekey attribute. The CapSkip hCaptcha page calls the sitekey a public UUID. When a script builds the widget instead, the sitekey is a parameter of hcaptcha.render(), which the configuration guide documents. After a successful challenge the guide says hCaptcha adds the <code>h-captcha-response<\/code> token to the form submission.<\/p>\n<p>So three things identify it: an element with the class h-captcha, a sitekey, and a form field called h-captcha-response once the challenge is passed. The CapSkip API docs add that a form may carry a second field named g-recaptcha-response, to be filled with the same token.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Checkbox, invisible and Enterprise accounts<\/h2>\n<p>Checkbox and invisible are two widget modes. Enterprise is an account tier that can use either, and it changes what the server&#8217;s verification reply contains. CapSkip uses one method for all of them.<\/p>\n<ul>\n<li><strong>Checkbox.<\/strong> The visitor ticks a box and, according to the CapSkip docs, sometimes answers a picture challenge.<\/li>\n<li><strong>Invisible.<\/strong> The invisible guide says you set data-size to invisible on the element, and the widget then renders in the background and shows itself only when a challenge is needed. Your page triggers it with hcaptcha.execute(), and the token goes to your callback function.<\/li>\n<li><strong>Enterprise.<\/strong> The verification reply gains two fields, score and score_reason, which the hCaptcha guide marks as Enterprise only. CapSkip has no score option on a task. The one related switch is High score mode for hCaptcha, covered in the FAQ below.<\/li>\n<\/ul>\n<p>Some Enterprise sites also pass a value called rqdata to the widget through hcaptcha.setData() before it runs. The public hCaptcha docs do not describe it, so everything here about it rests on the CapSkip docs: the site issues one value per challenge and it goes stale fast, so a script needs a new one for every task.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">What the server does with the token<\/h2>\n<p>The server posts the token to https:\/\/api.hcaptcha.com\/siteverify as a URL-encoded form body, and the guide warns not to send JSON. Two fields are required: the account secret and the token, sent as secret and response. The guide recommends remoteip (the user&#8217;s address) and lists sitekey as optional, a way to state which sitekey you expect. The JSON answer has success, challenge_ts, hostname and error-codes.<\/p>\n<p>Tokens are single use. The only lifetime the guide gives is a 120 second default, inside the description of one error code. The CapSkip docs put it at about two minutes. Request the token right before you submit.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Siteverify errors and what to check<\/h2>\n<p>These codes come from the error table in the hCaptcha guide. A script usually sees only a rejected form. The last column is a reading of what to check, not hCaptcha text.<\/p>\n<table>\n<thead>\n<tr>\n<th>Error code<\/th>\n<th>What the guide says<\/th>\n<th>What to check<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>missing-input-response<\/code><\/td>\n<td>The token parameter is missing.<\/td>\n<td>The form post carried no h-captcha-response field, or the site reads another name.<\/td>\n<\/tr>\n<tr>\n<td><code>invalid-input-response<\/code><\/td>\n<td>The token is invalid or malformed.<\/td>\n<td>The value was cut, edited or encoded twice on its way into the form.<\/td>\n<\/tr>\n<tr>\n<td><code>expired-input-response<\/code><\/td>\n<td>The token is expired (120 s default).<\/td>\n<td>Too long passed between solving and submitting. Solve, then submit at once.<\/td>\n<\/tr>\n<tr>\n<td><code>already-seen-response<\/code><\/td>\n<td>The token was already verified once.<\/td>\n<td>A token was reused, or a form post was retried with the old token. Request a new one each time.<\/td>\n<\/tr>\n<tr>\n<td><code>sitekey-secret-mismatch<\/code><\/td>\n<td>The sitekey is not registered with the provided secret.<\/td>\n<td>A site configuration problem on the server side, not something the script sends.<\/td>\n<\/tr>\n<tr>\n<td><code>invalid-input-secret<\/code><\/td>\n<td>The secret key is invalid or malformed.<\/td>\n<td>Also on the server side, in the code of the site owner.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">How it compares with reCAPTCHA and Turnstile<\/h2>\n<p>All three put one token in the form and verify it server-side, so the differences are names and numbers. reCAPTCHA uses g-recaptcha-response, and the Google verify guide says a token is valid for two minutes and can be verified once. Turnstile uses cf-turnstile-response, and the Cloudflare <a href=\"https:\/\/developers.cloudflare.com\/turnstile\/get-started\/server-side-validation\/\" rel=\"noopener nofollow\" target=\"_blank\">server-side validation guide<\/a> gives 300 seconds and single use. In the CapSkip Python SDK the calls are hcaptcha(), recaptcha() and turnstile(), taken from the 1.7.0 source.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">What a request to CapSkip looks like<\/h2>\n<p>CapSkip runs on your Windows PC and speaks the 2captcha request format, so an hCaptcha task is two HTTP calls. Both curl.exe commands below run as written in PowerShell and in cmd. The first submits the task and answers with a job id. The second polls with that id, and CAPCHA_NOT_READY means wait a few seconds and ask again. Add the field data only when the page sets an rqdata. The key matters only when API Key Validation is on in CapSkip.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"bash\" class=\"EnlighterJSRAW\">curl.exe -X POST -d &quot;key=YOUR_API_KEY&amp;method=hcaptcha&amp;sitekey=YOUR_SITEKEY&amp;pageurl=https:\/\/example.com\/login&amp;json=1&quot; http:\/\/127.0.0.1:8080\/in.php\r\ncurl.exe &quot;http:\/\/127.0.0.1:8080\/res.php?key=YOUR_API_KEY&amp;action=get&amp;id=12345&amp;json=1&quot;<\/pre>\n<\/div>\n<p>The same task through the Python SDK is one call that submits, polls and returns the result. The options are invisible, data (the Enterprise rqdata), userAgent and proxy. CapSkip uses a userAgent you send only if it matches the browser it solves with. The result carries the token as code and token, a respKey, and the User-Agent that earned the token.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"python\" class=\"EnlighterJSRAW\"># pip install capskip\r\nfrom capskip import CapSkip\r\n\r\n# The key matters only when API Key Validation is on in CapSkip.\r\nsolver = CapSkip(apiKey=&quot;YOUR_API_KEY&quot;, host=&quot;127.0.0.1&quot;, port=8080)\r\n\r\n# For an Enterprise rqdata add data=RQDATA; for an invisible widget\r\n# add invisible=1. Neither is needed for a plain checkbox.\r\nresult = solver.hcaptcha(\r\n    sitekey=&quot;YOUR_SITEKEY&quot;,\r\n    url=&quot;https:\/\/example.com\/login&quot;,\r\n)\r\n\r\n# The token goes in h-captcha-response, sent with this User-Agent.\r\nprint(result[&quot;code&quot;][:12], result[&quot;userAgent&quot;])<\/pre>\n<\/div>\n<p>Both blocks ran against a mock of CapSkip, not the real app, and each sent method=hcaptcha with the sitekey and page address given. No real solve took place, so there is no claim here about solve time or success rate. Full scripts and every parameter are on the <a href=\"https:\/\/capskip.com\/hcaptcha-solver\/\">CapSkip hCaptcha solver page<\/a>, and the method is listed in the <a href=\"https:\/\/capskip.com\/api-docs\/#hcaptcha\">CapSkip API docs<\/a>.<\/p>\n<ul>\n<li><a href=\"https:\/\/capskip.com\/hcaptcha-python\/\">hCaptcha in Python with the capskip SDK<\/a><\/li>\n<li><a href=\"https:\/\/capskip.com\/hcaptcha-enterprise-nodejs\/\">hCaptcha Enterprise in Node.js with a fresh rqdata<\/a><\/li>\n<li><a href=\"https:\/\/capskip.com\/hcaptcha-csharp\/\">hCaptcha in C# with HCaptchaAsync<\/a><\/li>\n<\/ul>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Running CapSkip on a server<\/h2>\n<p>If your script runs on another machine, switch CapSkip to Server mode and point the host setting at that machine. The <a href=\"https:\/\/capskip.com\/setup-guide\/#connection-settings\">connection settings in the setup guide<\/a> explain both modes, and Server mode needs CapSkip to run as administrator, and the machine stays a Windows PC you control. Check which addresses can reach the port, and add a Windows Firewall block rule for the ones that should not. Because the solve happens on that machine, hCaptcha sees its network, so attach a proxy to the task if that matters to the site.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Frequently asked questions<\/h2>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">Is hCaptcha the same as reCAPTCHA?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">No. They are separate services with their own widgets, field names and verification hosts. A script has to send the right field and ask CapSkip for the right method.<\/p>\n<\/details>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">How do I tell if a site uses hCaptcha Enterprise?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">Not always from the front end. The CapSkip docs say some Enterprise sites pass an rqdata value to hcaptcha.setData() before the widget runs. If you see that call, send the value as the data option, fresh for every task. If you do not, solve normally and try High score mode if the site refuses tokens.<\/p>\n<\/details>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">Why does a form reject a token that CapSkip returned?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">The CapSkip docs list the usual causes: a token that is old or already used, a sitekey that doesn&#8217;t match the page, or a User-Agent that differs from the one in the reply. For strict sites they add the High score mode setting for hCaptcha, under Settings, Captcha types, which needs Google Chrome on the CapSkip PC.<\/p>\n<\/details>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">Can I run CapSkip on a server for hCaptcha tasks?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">Yes. Use Server mode on a Windows machine you control and point your script at its address.<\/p>\n<\/details>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">The short version<\/h2>\n<p>hCaptcha is a widget that ends in one single-use token, checked once at the hCaptcha siteverify address. A <a href=\"https:\/\/capskip.com\/\">local captcha solver<\/a> on your own Windows PC covers the checkbox, invisible and Enterprise cases with one method and no per-solve fee.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>hCaptcha \u662f\u4e00\u79cd\u4ee5\u670d\u52a1\u5668\u6821\u9a8c\u7684 token \u6536\u5c3e\u7684\u673a\u5668\u4eba\u68c0\u67e5\u3002\u8fd9\u91cc\u8bb2\u89e3\u5982\u4f55\u8bc6\u522b\u5b83\u3001\u6bcf\u4e2a siteverify \u9519\u8bef\u662f\u4ec0\u4e48\u610f\u601d\uff0c\u4ee5\u53ca\u811a\u672c\u8981\u53d1\u9001\u4ec0\u4e48\u3002<\/p>","protected":false},"author":1,"featured_media":28039,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"What Is hCaptcha? Token, Siteverify, Enterprise | CapSkip","rank_math_description":"What is hcaptcha? A widget that puts an h-captcha-response token in your form. See how a server verifies it, what Enterprise adds and what CapSkip sends.","rank_math_focus_keyword":"what is hcaptcha","footnotes":""},"categories":[70],"tags":[],"class_list":["post-28040","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-captcha"],"_links":{"self":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/comments?post=28040"}],"version-history":[{"count":1,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28040\/revisions"}],"predecessor-version":[{"id":28330,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28040\/revisions\/28330"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media\/28039"}],"wp:attachment":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media?parent=28040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/categories?post=28040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/tags?post=28040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}