Explainers

reCAPTCHA v2 Invisible: Trigger Detection and Solving

reCAPTCHA v2 Invisible has no visible checkbox. It activates automatically when a user submits a form or clicks a button, and only shows a challenge if Google's risk analysis detects suspicious behavior. This makes it harder to detect in automation — you might not realize there's a CAPTCHA until your form submission fails.


How Invisible reCAPTCHA differs from standard v2

Feature reCAPTCHA v2 Standard reCAPTCHA v2 Invisible
Visible widget Yes (checkbox) No (badge only)
User interaction Click checkbox Automatic on form submit
data-size normal or compact invisible
Challenge popup Always possible Only for suspicious users
DOM element .g-recaptcha div .g-recaptcha div or programmatic

Detecting Invisible reCAPTCHA

Method 1: Check data-size attribute

// Browser console
const widgets = document.querySelectorAll('.g-recaptcha');
widgets.forEach((el, i) => {
  const size = el.getAttribute('data-size');
  const sitekey = el.getAttribute('data-sitekey');
  console.log(`Widget ${i}: size=${size}, sitekey=${sitekey}`);
  if (size === 'invisible') {
    console.log('  → This is Invisible reCAPTCHA');
  }
});

Method 2: Check for the badge

Invisible reCAPTCHA shows a small badge in the corner:

const badge = document.querySelector('.grecaptcha-badge');
if (badge) {
  console.log('reCAPTCHA badge found — likely Invisible reCAPTCHA');
  console.log('Badge visibility:', getComputedStyle(badge).visibility);
}

Method 3: Check grecaptcha.execute calls

If the page uses programmatic invocation (no .g-recaptcha div):

// Look for grecaptcha.execute in page scripts
document.querySelectorAll('script:not([src])').forEach(s => {
  if (s.textContent.includes('grecaptcha.execute')) {
    console.log('Found grecaptcha.execute — Invisible reCAPTCHA');
    const match = s.textContent.match(/grecaptcha\.execute\s*\(\s*['"]?([^'",\s)]+)/);
    if (match) console.log('Sitekey:', match[1]);
  }
});

Method 4: Check script tag render parameter

document.querySelectorAll('script[src*="recaptcha"]').forEach(s => {
  if (s.src.includes('render=') && !s.src.includes('render=explicit')) {
    console.log('Invisible/v3 reCAPTCHA detected in script:', s.src);
  }
});

Solving with CaptchaAI

The key difference: pass invisible=1 to CaptchaAI so the solver knows it's handling an Invisible variant.

Python

import requests
import time

API_KEY = "YOUR_API_KEY"

# Submit with invisible flag
resp = requests.post("https://ocr.captchaai.com/in.php", data={
    "key": API_KEY,
    "method": "userrecaptcha",
    "googlekey": "6Le-SITEKEY",
    "pageurl": "https://example.com/login",
    "invisible": "1",  # critical for Invisible reCAPTCHA
    "json": "1",
}).json()

if resp["status"] != 1:
    raise Exception(f"Submit error: {resp['request']}")

task_id = resp["request"]
print(f"Submitted: {task_id}")

# Poll for result
for _ in range(24):
    time.sleep(5)
    result = requests.get("https://ocr.captchaai.com/res.php", params={
        "key": API_KEY, "action": "get", "id": task_id, "json": "1"
    }).json()

    if result["status"] == 1:
        print(f"Token: {result['request'][:50]}...")
        break
    if result["request"] != "CAPCHA_NOT_READY":
        raise Exception(f"Error: {result['request']}")

JavaScript

const axios = require('axios');

const resp = await axios.post('https://ocr.captchaai.com/in.php', null, {
  params: {
    key: 'YOUR_API_KEY',
    method: 'userrecaptcha',
    googlekey: '6Le-SITEKEY',
    pageurl: 'https://example.com/login',
    invisible: 1,
    json: 1,
  }
});
const taskId = resp.data.request;
console.log(`Submitted: ${taskId}`);

Token injection for Invisible reCAPTCHA

Invisible reCAPTCHA is typically bound to a button or form submit. After injection, you need to trigger the callback or submit the form:

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("https://example.com/login")

# After solving, inject and trigger
driver.execute_script("""
    // Set the token
    document.querySelector('textarea[name="g-recaptcha-response"]').value = arguments[0];

    // Find and trigger the callback
    var widget = document.querySelector('.g-recaptcha');
    var callbackName = widget ? widget.getAttribute('data-callback') : null;

    if (callbackName && typeof window[callbackName] === 'function') {
        window[callbackName](arguments[0]);
    }
""", token)

# Submit the form
driver.find_element(By.CSS_SELECTOR, "form#login").submit()

Identifying the trigger element

Invisible reCAPTCHA can be bound to a specific button:

<button class="g-recaptcha"
        data-sitekey="6Le-SITEKEY"
        data-callback="onSubmit"
        data-size="invisible">
  Submit
</button>

Or activated programmatically:

// Site's code
document.getElementById('submit-btn').addEventListener('click', function() {
  grecaptcha.execute();
});

Check both patterns:

// Find elements with g-recaptcha class that are buttons
document.querySelectorAll('button.g-recaptcha, input.g-recaptcha').forEach(el => {
  console.log('Trigger element:', el.tagName, el.textContent.trim());
  console.log('  data-sitekey:', el.getAttribute('data-sitekey'));
  console.log('  data-callback:', el.getAttribute('data-callback'));
});

Troubleshooting

Problem Cause Fix
Token rejected Missing invisible=1 in submit Add invisible: "1" to CaptchaAI request
Can't find sitekey No .g-recaptcha div Check for programmatic grecaptcha.render() or grecaptcha.execute() calls
Form submits but fails Callback not triggered Find and call the data-callback function
CAPTCHA not detected Only appears for suspicious traffic Check for grecaptcha-badge element or recaptcha script tags

FAQ

How do I tell apart Invisible v2 from v3?

Invisible v2 uses grecaptcha.execute() without an action parameter. v3 uses grecaptcha.execute(sitekey, {action: 'submit'}) with an action. Also, v3 uses render=SITEKEY in the script URL.

Does forgetting the invisible flag matter?

Yes. Without invisible=1, the solver may try a different solving approach that produces tokens rejected by the site.

Can I solve Invisible reCAPTCHA without a browser?

Yes — you only need the sitekey and page URL. The browser is only needed to inject the token and trigger the callback.


Solve reCAPTCHA v2 Invisible seamlessly with CaptchaAI

Get your API key at captchaai.com.


Discussions (0)

No comments yet.

Related Posts

Reference CAPTCHA Token Injection Methods Reference
Complete reference for injecting solved CAPTCHA tokens into web pages.

Complete reference for injecting solved CAPTCHA tokens into web pages. Covers re CAPTCHA, Turnstile, and Cloud...

Python Automation Cloudflare Turnstile
Apr 08, 2026
Tutorials Pytest Fixtures for CaptchaAI API Testing
Build reusable pytest fixtures to test CAPTCHA-solving workflows with Captcha AI.

Build reusable pytest fixtures to test CAPTCHA-solving workflows with Captcha AI. Covers mocking, live integra...

Python Automation Cloudflare Turnstile
Apr 08, 2026
API Tutorials How to Solve reCAPTCHA v2 Enterprise with Python
Solve re CAPTCHA v 2 Enterprise using Python and Captcha AI API.

Solve re CAPTCHA v 2 Enterprise using Python and Captcha AI API. Complete guide with sitekey extraction, task...

Python Automation reCAPTCHA v2
Apr 08, 2026
Troubleshooting ERROR_PAGEURL: URL Mismatch Troubleshooting Guide
Fix ERROR_PAGEURL when using Captcha AI.

Fix ERROR_PAGEURL when using Captcha AI. Diagnose URL mismatch issues, handle redirects, SPAs, and dynamic URL...

Python Automation Cloudflare Turnstile
Mar 23, 2026
Troubleshooting Handling reCAPTCHA v2 and Cloudflare Turnstile on the Same Site
Solve both re CAPTCHA v 2 and Cloudflare Turnstile on sites that use multiple CAPTCHA providers — detect which type appears, solve each correctly, and handle pr...

Solve both re CAPTCHA v 2 and Cloudflare Turnstile on sites that use multiple CAPTCHA providers — detect which...

Python Automation Cloudflare Turnstile
Mar 23, 2026
Tutorials CAPTCHA Solving Fallback Chains
Implement fallback chains for CAPTCHA solving with Captcha AI.

Implement fallback chains for CAPTCHA solving with Captcha AI. Cascade through solver methods, proxy pools, an...

Python Automation Cloudflare Turnstile
Apr 06, 2026
Use Cases Multi-Step Workflow Automation with CaptchaAI
Manage workflows across multiple accounts on CAPTCHA-protected platforms — , action, and data collection at scale.

Manage workflows across multiple accounts on CAPTCHA-protected platforms — , action, and data collection at sc...

Python Automation Cloudflare Turnstile
Apr 06, 2026
Integrations Solving CAPTCHAs in React Native WebViews with CaptchaAI
how to detect and solve re CAPTCHA v 2 and Cloudflare Turnstile CAPTCHAs inside React Native Web Views using the Captcha AI API with working Java Script bridge...

Learn how to detect and solve re CAPTCHA v 2 and Cloudflare Turnstile CAPTCHAs inside React Native Web Views u...

Python Automation Cloudflare Turnstile
Mar 30, 2026
Comparisons WebDriver vs Chrome DevTools Protocol for CAPTCHA Automation
Compare Web Driver and Chrome Dev Tools Protocol (CDP) for CAPTCHA automation — detection, performance, capabilities, and when to use each with Captcha AI.

Compare Web Driver and Chrome Dev Tools Protocol (CDP) for CAPTCHA automation — detection, performance, capabi...

Python Automation Cloudflare Turnstile
Mar 27, 2026
Explainers reCAPTCHA v2 Callback Mechanism: How Callbacks Work and How to Trigger Them
Understand how re CAPTCHA v 2 callbacks work, how to find the callback function name, and how to trigger it after injecting a solved token from Captcha AI.

Understand how re CAPTCHA v 2 callbacks work, how to find the callback function name, and how to trigger it af...

Python Automation reCAPTCHA v2
Mar 26, 2026
Explainers How BLS CAPTCHA Works: Grid Logic and Image Selection
Deep dive into BLS CAPTCHA grid logic — how images are arranged, how instructions map to selections, and how Captcha AI processes BLS challenges.

Deep dive into BLS CAPTCHA grid logic — how images are arranged, how instructions map to selections, and how C...

Automation BLS CAPTCHA
Apr 09, 2026
Explainers How BLS CAPTCHA Works
Understand how BLS CAPTCHA works on visa appointment systems.

Understand how BLS CAPTCHA works on visa appointment systems. Learn about its image selection mechanism, how i...

Automation BLS CAPTCHA
Apr 06, 2026
Explainers How to Get High Human Score on reCAPTCHA v3
proven techniques to achieve a high re CAPTCHA v 3 score.

Learn proven techniques to achieve a high re CAPTCHA v 3 score. Covers browser setup, behavioral signals, prox...

Automation reCAPTCHA v3
Apr 04, 2026