Name | Typ | Erforderlich | Beschreibung |
---|---|---|---|
type | Zeichenfolge | Ja | HCaptchaEnterpriseTask |
websiteURL | Zeichenfolge | Ja | Die vollständige URL der Zielseite, auf die der Bestätigungscode geladen wird |
websiteKey | Zeichenfolge | Ja | hCaptcha-Website-Schlüssel. Kann im Attribut „data-sitekey“ des hCaptcha-div-Elements oder im Parameter „sitekey“ einer Anfrage an die hCaptcha-API gefunden werden |
isInvisible | Boolescher Wert | NEIN | Funktioniert mit der unsichtbaren Version von hCaptcha – kein Kontrollkästchen, aber eine Herausforderung wird angezeigt. Wird normalerweise mit Rückruffunktionen verwendet |
enterprisePayload | Objekt | NEIN | Ein Objekt, das zusätzliche Parameter enthält, wie zum Beispiel: „rqdata“. |
proxyType | Zeichenfolge | Ja | Proxy-Typ: „http“, „socks4“, „socks5“. |
proxyAddress | Zeichenfolge | Ja | IP-Adresse oder Hostname des Proxyservers |
proxyPort | Ganze Zahl | Ja | Proxy-Port |
proxyLogin | Zeichenfolge | NEIN | Agenten-Login |
proxyPassword | Zeichenfolge | NEIN | Agentenpasswort |
API-Endpunkt: https://api.nextcaptcha.com/createTask
Methode: POST
Inhaltstyp: application/json
{
"clientKey":"api key",
"task": {
"type":"HCaptchaEnterpriseTask",
"websiteURL":"https://hcaptcha.com/demo/hcaptcha",
"websiteKey":"f7de0da3-3303-44e8-ab48-fa32ff8ccc7b",
"isInvisible":false,
"enterprisePayload": {
"rqdata": "eyJ0eXAi"
},
"proxyType":"http",
"proxyAddress":"your_proxy_address",
"proxyPort":1234,
"proxyLogin":"your_proxy_login",
"proxyPassword":"your_proxy_password"
}
}
{
"errorId": 0,
"status": "ready",
"solution": {
"respKey": "E0_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299",
"gRecaptchaResponse": "P1_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
},
"createTime": 1701234567890,
"endTime": 1701234567890
}
# 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.hcaptcha_enterprise(website_url="https://example.com", website_key="SITE_KEY")
except Exception as e:
sys.exit(e)
else:
sys.exit('solved: ' + str(result))
// https://github.com/nextcaptcha/nextcaptcha-go
package main
import (
"fmt"
"log"
"github.com/nextcaptcha/nextcaptcha-go"
)
func main() {
api := nextcaptcha.NewNextCaptchaAPI("API_KEY")
result, err := api.HCaptchaEnterprise("https://example.com", "SITE_KEY", nextcaptcha.RecaptchaV3Options{})
if err != nil {
log.Fatal(err);
}
fmt.Println("result "+result)
}
// https://github.com/nextcaptcha/nextcaptcha-csharp
string clientKey = "YOUR_CLIENT_KEY";
string solftId = ""; // Optional
string callbackUrl = ""; // Optional
bool openLog = true; // Optional
var nextCaptchaAPI = new NextCaptchaAPI(clientKey, solftId, callbackUrl, openLog);
string websiteUrl = "https://example.com";
string websiteKey = "YOUR_WEBSITE_KEY";
Dictionary<string, object> enterprisePayload = null; // Optional
bool isInvisible = false; // Optional
string proxyType = ""; // Optional
string proxyAddress = ""; // Optional
int proxyPort = 0; // Optional
string proxyLogin = ""; // Optional
string proxyPassword = ""; // Optional
var result = await nextCaptchaAPI.SolveHCaptchaEnterpriseAsync(websiteUrl, websiteKey, enterprisePayload, isInvisible, proxyType, proxyAddress, proxyPort, proxyLogin, proxyPassword);