{"id":27980,"date":"2026-11-17T11:39:32","date_gmt":"2026-11-17T11:39:32","guid":{"rendered":"https:\/\/capskip.com\/?p=27980"},"modified":"2026-11-17T11:39:32","modified_gmt":"2026-11-17T11:39:32","slug":"recaptcha-v2-vs-v3","status":"publish","type":"post","link":"https:\/\/capskip.com\/zh\/recaptcha-v2-vs-v3\/","title":{"rendered":"reCAPTCHA v2\u3001v3 \u4e0e Enterprise\uff1aCapSkip \u8981\u53d1\u9001\u7684\u5b57\u6bb5"},"content":{"rendered":"<p>The reCAPTCHA v2 vs v3 question has a practical answer for anyone fetching tokens in code: it decides which fields go into the solver request. v2 needs a sitekey and a page address, v3 also needs an action name, and Enterprise is a flag on top of either. This post is the request cheat sheet. For what each widget is and how to recognise it, start with <a href=\"https:\/\/capskip.com\/what-is-recaptcha\/\">what reCAPTCHA is<\/a> and come back here for the fields.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Which CapSkip fields each reCAPTCHA variant needs<\/h2>\n<p>CapSkip is 2captcha compatible, so every variant is one <code>userrecaptcha<\/code> task and the flags pick the variant. The names come from the <a href=\"https:\/\/capskip.com\/api-docs\/\">API docs<\/a> and were checked against the Python and Node.js SDK source at 1.7.0.<\/p>\n<table>\n<thead>\n<tr>\n<th>Variant<\/th>\n<th>Fields sent to in.php<\/th>\n<th>Python call<\/th>\n<th>Node.js call<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>v2 checkbox<\/td>\n<td>googlekey, pageurl<\/td>\n<td>recaptcha(sitekey, url)<\/td>\n<td>recaptcha(sitekey, url)<\/td>\n<\/tr>\n<tr>\n<td>v2 invisible<\/td>\n<td>adds invisible=1<\/td>\n<td>adds invisible=1<\/td>\n<td>options with invisible set to 1<\/td>\n<\/tr>\n<tr>\n<td>v3<\/td>\n<td>adds version=v3 and an action<\/td>\n<td><code>version=&quot;v3&quot;, action=&quot;login&quot;<\/code><\/td>\n<td>options with version set to v3 and an action<\/td>\n<\/tr>\n<tr>\n<td>Enterprise v2<\/td>\n<td>adds enterprise=1<\/td>\n<td>adds enterprise=1<\/td>\n<td>options with enterprise set to 1<\/td>\n<\/tr>\n<tr>\n<td>Enterprise v2 invisible<\/td>\n<td>adds enterprise=1 and invisible=1<\/td>\n<td>both keyword arguments<\/td>\n<td>both options<\/td>\n<\/tr>\n<tr>\n<td>Enterprise v3<\/td>\n<td>adds version=v3, an action and enterprise=1<\/td>\n<td>all three keyword arguments<\/td>\n<td>all three options<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Three details save debugging time. First, the API docs list <code>action=verify<\/code> as the default for v3. Neither SDK sends an action when you leave it out, so the default is applied by the app, and I couldn&#8217;t test that. A page that checks for <code>action=login<\/code> needs you to pass it. Second, the callback is not part of the request: CapSkip returns the token, and for a callback or invisible widget your page code calls the callback with it. Third, the API docs say a v2 Enterprise page may carry an extra custom string in an s or data-s parameter. If the page has one, send it as the data-s field, which the SDKs accept under the keyword datas.<\/p>\n<p>Here are the v2 variants in Python. The token comes back under the code key of the result.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"python\" class=\"EnlighterJSRAW\"># pip install capskip\nfrom capskip import CapSkip\n\nsolver = CapSkip(host=&quot;127.0.0.1&quot;, port=8080)\nPAGE = &quot;https:\/\/example.com\/page-with-recaptcha&quot;\nKEY = &quot;YOUR_SITEKEY&quot;\n\n# Checkbox v2, then the invisible flavour of v2.\nv2 = solver.recaptcha(sitekey=KEY, url=PAGE)\ninvisible = solver.recaptcha(sitekey=KEY, url=PAGE, invisible=1)\n\n# Enterprise is a flag. Add the page's data-s value if it has one.\nent = solver.recaptcha(sitekey=KEY, url=PAGE, enterprise=1,\n                       datas=&quot;YOUR_DATA_S&quot;)\nent_inv = solver.recaptcha(sitekey=KEY, url=PAGE, enterprise=1, invisible=1)\n\nprint(v2[&quot;code&quot;][:20])   # token, ready for the form field<\/pre>\n<\/div>\n<p>For v3 you name the version and the action the page passes to its execute call.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"python\" class=\"EnlighterJSRAW\"># pip install capskip\nfrom capskip import CapSkip\n\nsolver = CapSkip(host=&quot;127.0.0.1&quot;, port=8080)\nPAGE = &quot;https:\/\/example.com\/page-with-recaptcha&quot;\nKEY = &quot;YOUR_SITEKEY&quot;\n\nv3 = solver.recaptcha(sitekey=KEY, url=PAGE, version=&quot;v3&quot;, action=&quot;login&quot;)\n\n# v3 Enterprise adds the same flag as v2 Enterprise.\nent_v3 = solver.recaptcha(sitekey=KEY, url=PAGE, version=&quot;v3&quot;,\n                          action=&quot;login&quot;, enterprise=1)\n\nprint(v3[&quot;code&quot;][:20])   # token for the action you named<\/pre>\n<\/div>\n<p>The Node.js SDK takes the same choices as an options object after the sitekey and the page address.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">\/\/ npm install capskip\nconst { CapSkip } = require('capskip');\n\nconst solver = new CapSkip({ host: '127.0.0.1', port: 8080 });\nconst PAGE = 'https:\/\/example.com\/page-with-recaptcha';\n\n(async () =&gt; {\n  const v3 = await solver.recaptcha('YOUR_SITEKEY', PAGE,\n    { version: 'v3', action: 'login' });\n  const ent = await solver.recaptcha('YOUR_SITEKEY', PAGE,\n    { enterprise: 1, invisible: 1 });\n  console.log(v3.code.slice(0, 20), ent.code.slice(0, 20));\n})();<\/pre>\n<\/div>\n<p>Both SDKs also refuse mixed-up requests before anything is sent. An action on a v2 task and the invisible flag on a v3 task each raise the validation exception, which is cheaper than finding out from a failed form submission.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"python\" class=\"EnlighterJSRAW\"># pip install capskip\nfrom capskip import CapSkip, ValidationException\n\nsolver = CapSkip(host=&quot;127.0.0.1&quot;, port=8080)\nPAGE = &quot;https:\/\/example.com\/page-with-recaptcha&quot;\n\ntry:\n    # An action only exists on v3, so this v2 task is refused locally.\n    solver.recaptcha(sitekey=&quot;YOUR_SITEKEY&quot;, url=PAGE, action=&quot;login&quot;)\nexcept ValidationException as err:\n    print(&quot;refused:&quot;, err)<\/pre>\n<\/div>\n<p>I ran these blocks against a mock in.php and res.php, not the real app, on Python 3.11.7, 3.13.7 and 3.14.0 and on Node.js 24.22.0, all with capskip 1.7.0. The mock recorded the fields each call sent, and they matched the table: every call carried the method, the sitekey and the page address, plus an explicit enterprise value of 0 or 1 that the SDK fills in, and the other variants added exactly the flags listed. That proves the request shape, not a solve.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">What the server checks for each variant<\/h2>\n<p>The differences on the receiving side are what make the flags necessary. This table compares only what a site&#8217;s backend sees.<\/p>\n<table>\n<thead>\n<tr>\n<th>Variant<\/th>\n<th>Where the token comes from<\/th>\n<th>Backend check<\/th>\n<th>Fields it can read<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>v2 checkbox<\/td>\n<td>The widget, posted as g-recaptcha-response<\/td>\n<td>Classic verification<\/td>\n<td>Success, challenge time, hostname<\/td>\n<\/tr>\n<tr>\n<td>v2 invisible<\/td>\n<td>An execute call or a bound button, passed to the callback<\/td>\n<td>Classic verification<\/td>\n<td>Success, challenge time, hostname<\/td>\n<\/tr>\n<tr>\n<td>v3<\/td>\n<td>An execute call that names an action<\/td>\n<td>Classic verification<\/td>\n<td>Adds score and action<\/td>\n<\/tr>\n<tr>\n<td>Enterprise, score-based key<\/td>\n<td>The enterprise execute call<\/td>\n<td>An assessment on the backend<\/td>\n<td>Token validity, action, risk score<\/td>\n<\/tr>\n<tr>\n<td>Enterprise, checkbox key<\/td>\n<td>The widget rendered from the enterprise script<\/td>\n<td>An assessment on the backend<\/td>\n<td>Token validity, risk score<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>All of them share one rule: a token is valid for two minutes and can be verified once. Google&#8217;s verification guide says so for the classic endpoint and its assessment guide repeats it for Enterprise, so <a href=\"https:\/\/capskip.com\/recaptcha-token-expiration\/\">the token expiration guide<\/a> matters for every row. Google&#8217;s <a href=\"https:\/\/developers.google.com\/recaptcha\/docs\/v3\" rel=\"nofollow noopener\" target=\"_blank\">v3 documentation<\/a> adds that the site should check the returned action against the one it expected, and its <a href=\"https:\/\/docs.cloud.google.com\/recaptcha\/docs\/create-assessment-website\" rel=\"nofollow noopener\" target=\"_blank\">assessment guide<\/a> says assessments belong on the backend.<\/p>\n<p>On the Enterprise vs v3 question: Google describes two kinds of Enterprise key. Score-based keys call the enterprise execute function, like v3 does. Checkbox keys render a widget from the enterprise script, like v2 does, and never call it. That is why Enterprise is a flag in the request and not a third version.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">The score is Google&#8217;s, not a CapSkip option<\/h2>\n<p>Google scores a v3 visit from 0.0 for very likely a bot to 1.0 for very likely a good interaction and suggests 0.5 as a default threshold. CapSkip has no setting that asks for a score, so nothing in your solving code can promise a number. What you control is the action you pass and when you ask.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Reading the values off the page<\/h2>\n<p>The sitekey sits in the data-sitekey attribute or in the k parameter of the widget&#8217;s frame address. For v3 and score-based Enterprise keys, the action is the string in the page&#8217;s execute call. Enterprise shows itself through the enterprise script and calls on the enterprise object. The per-variant solver guides go deeper:<\/p>\n<ul>\n<li><a href=\"https:\/\/capskip.com\/recaptcha-v2-solver\/\">The reCAPTCHA v2 solver<\/a>, for checkbox, invisible and callback widgets<\/li>\n<li><a href=\"https:\/\/capskip.com\/recaptcha-v3-solver\/\">The reCAPTCHA v3 solver<\/a>, for score-based pages<\/li>\n<li><a href=\"https:\/\/capskip.com\/recaptcha-enterprise-solver\/\">The reCAPTCHA Enterprise solver<\/a>, for either style<\/li>\n<\/ul>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Calling it from another machine<\/h2>\n<p>CapSkip is a Windows application, and the examples above talk to it on 127.0.0.1. If your scripts run elsewhere, switch CapSkip to Server mode and point the host setting at that Windows PC. The setup guide covers the switch under <a href=\"https:\/\/capskip.com\/setup-guide\/#connection-settings\">connection settings<\/a> and recommends a static public IP for stable remote access. Server mode leaves the port reachable from any address, because CapSkip adds an allow rule for it each time it starts. To limit callers, add a Windows Firewall block rule for the addresses you don&#8217;t trust.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">FAQ<\/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 reCAPTCHA v2 or v3 harder to automate?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">Neither needs different tooling: both are one task with different flags. The practical difference is that v3 has no widget to watch. You find the action in the page script, and the outcome depends on a Google score you can&#8217;t set.<\/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;\">Does v3 ever show a challenge?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">Not according to Google, which says v3 never interrupts users. A site that wants a visible step after a low score has to build one itself.<\/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;\">Is Enterprise v2 or v3?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">Either. Enterprise is the product tier, so the page decides the style. In CapSkip you add the enterprise flag to a v2 task or to a v3 task, and nothing else about the request changes.<\/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 pick the score CapSkip gets?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">No. CapSkip has no setting for it. Pass the right action, ask for the token right before the request that uses it, and read the outcome from the site.<\/p>\n<\/details>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Which one are you solving?<\/h2>\n<p>Look at the page first: a box or an invisible trigger means v2, an execute call with an action means v3, and the enterprise script means a flag on either. Then match the row in the request table. Because CapSkip runs on your own Windows PC as an <a href=\"https:\/\/capskip.com\/\">unlimited captcha solver<\/a>, asking for a fresh token for each variant, or again after one expires, doesn&#8217;t add to a bill.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>reCAPTCHA v2\u3001v3 \u548c Enterprise \u5728 CapSkip \u8bf7\u6c42\u91cc\u9700\u8981\u4e0d\u540c\u7684\u5b57\u6bb5\u3002\u8fd9\u91cc\u7ed9\u51fa\u6bcf\u79cd\u53d8\u4f53\u7684\u8bf7\u6c42\u3001\u670d\u52a1\u5668\u68c0\u67e5\u4ec0\u4e48\uff0c\u4ee5\u53ca\u7ecf\u8fc7\u6d4b\u8bd5\u7684 Python \u548c Node.js \u8c03\u7528\u3002<\/p>","protected":false},"author":1,"featured_media":27979,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"reCAPTCHA v2 vs v3: Fields to Send | CapSkip","rank_math_description":"reCAPTCHA v2 vs v3 vs Enterprise decides which fields your solver request needs. See what the server checks and the exact CapSkip call, tested in Python.","rank_math_focus_keyword":"recaptcha v2 vs v3","footnotes":""},"categories":[70],"tags":[],"class_list":["post-27980","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\/27980","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=27980"}],"version-history":[{"count":2,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/27980\/revisions"}],"predecessor-version":[{"id":27988,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/27980\/revisions\/27988"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media\/27979"}],"wp:attachment":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media?parent=27980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/categories?post=27980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/tags?post=27980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}