reCAPTCHA Enterprise V2#


Token-based automatic solving method for reCAPTCHA V2 Enterprise.
The received token can then be sent to the target website within the g-recaptcha-response form field or passed to a callback function. The method is the same as reCAPTCHA V2, but uses the reCAPTCHA Enterprise API to load the Captcha.

RecaptchaV2EnterpriseTaskProxyless Task object structure#

nametypeRequiredDescription
typeStringYesRecaptchaV2EnterpriseTaskProxyless
websiteURLStringYesComplete URL of the target page for loading the Captcha
websiteKeyStringYesreCAPTCHA website key. This can be found in the data-sitekey attribute of the reCAPTCHA div element or in the k parameter of a request to the reCAPTHCHA API.
pageActionStringNoFor additional parameters, you can search grecaptcha.execute to find the action parameters
enterprisePayloadObjectNos parameter in grecaptcha.enterprise.render
isInvisibleBooleanNoFor the invisible version of reCAPTCHA, pass true - you won't see the checkbox, but the challenge will appear. Mostly used with callback functions
apiDomainStringNoDomain name used to load Captcha: google.com or recaptcha.net. Default: google.com

Request example#

API endpoint: https://api.nextcaptcha.com/createTask

method: POST

Content type: application/json

{
    "clientKey":"api key",
    "task": {
        "type":"RecaptchaV2EnterpriseTaskProxyless",
        "websiteURL":"https://www.google.com/recaptcha/api2/demo",
        "websiteKey":"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
        "enterprisePayload": { "s":  "eyJ0eXAi..." }
    }
}

Response example#

{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "03AGdBq26gJ8Yq3z3Zzv"
  },
  "createTime": 1701234567890,
  "endTime": 1701234567890
}

Sample Code#

# https://github.com/nextcaptcha/nextcaptcha-python
 
import os
import sys
from nextcaptcha import NextCaptchaAPI
 
client_key = os.getenv('NEXTCAPTCHA_KEY', "YOUR_CLIENT_KEY")
 
api = NextCaptchaAPI(client_key=client_key)
try:
  result = api.recaptchav2enterprise(website_url="https://example.com", website_key="SITE_KEY")
 
except Exception as e:
  sys.exit(e)
 
else:
  sys.exit('solved: ' + str(result))
 

Related Links#