1. Root Causes for ERROR_EMPTY_ACTION
- The target website requires grecaptcha.execute(sitekey, { action: '...' }) and the action was omitted
- Submitting v3 challenges using standard v2 API endpoints
- Action string contains invalid characters or whitespace
2. How to Resolve & Prevent This Error
- Inspect client JavaScript to capture the exact action string (e.g. 'login', 'homepage', 'verify')
- Always include the action parameter in your 2Captcha v3 payload
- Specify min_score='0.9' to guarantee human-like evaluation scores
3. Python Code Fix & Defensive Error Handling
# Pass exact reCAPTCHA v3 action string
from twocaptcha import TwoCaptcha
solver = TwoCaptcha("YOUR_API_KEY")
result = solver.recaptcha(
sitekey="6Lc_aXcUAAAAAMFm5p0Y...",
url="https://example.com/checkout",
version="v3",
action="checkout", # exact action required
score="0.9"
)
print("Token:", result["code"])4. Node.js Implementation
await solver.recaptcha({
googlekey: "6Lc_aXcUAAAAAMFm5p0Y...",
pageurl: "https://example.com/checkout",
version: "v3",
action: "checkout",
minScore: 0.9
});5. Why 2Captcha Minimizes API Errors
2Captcha Reliability Architecture
Rank #1 Overall- No Slot Saturation: Tens of thousands of workers online 24/7 ensure sub-5 second task pickup
- Zero Fee for Failures: Unsolvable CAPTCHAs are never charged to your account balance
- Pay-As-You-Go: Deposits never expire, with a low minimum top-up of just $1.00
6. Frequently Asked Questions
What happens if the action string does not match?
The target website backend will score the token as 0.1 (bot detected) and trigger a secondary challenge or ban.
How can I discover the correct action string?
Search the target page HTML/JS source code for 'grecaptcha.execute' to view the action value.