| nazwa | typ | Wymagany | Opis |
|---|---|---|---|
| type | String | Tak | TurnstileTaskProxyless |
| websiteURL | String | Tak | Pełny URL strony docelowej, na której jest załadowany widget Turnstile |
| websiteKey | String | Tak | Klucz witryny Turnstile. Można go znaleźć w atrybucie data-sitekey elementu widgetu Turnstile |
| action | String | NIE | Wartość parametru action dla stron Challenge Turnstile, z opcji wywołania turnstile.render |
| data | String | NIE | Wartość parametru cData wymagana dla stron Challenge Turnstile |
| pagedata | String | NIE | Wartość parametru chlPageData wymagana dla stron Challenge Turnstile |
Punkt końcowy interfejsu API: https://api.nextcaptcha.com/createTask
metoda: POST
Typ zawartości: application/json
{
"clientKey":"api key",
"task": {
"type":"TurnstileTaskProxyless",
"websiteURL":"https://example.com",
"websiteKey":"0x4XXXXXXXXXXXXXXXXX"
}
}{
"errorId": 0,
"status": "ready",
"solution": {
"token": "0.erxoMnovo7sGfKRqH1F2wME..."
},
"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.turnstile(website_url="https://example.com", website_key="0x4XXXXXXXXXXXXXXXXX")
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() {
client := nextcaptcha.NewNextCaptchaAPI("API_KEY")
result, err := client.Turnstile("https://example.com", "0x4XXXXXXXXXXXXXXXXX", nextcaptcha.TurnstileOptions{})
if err != nil {
log.Fatal(err);
}
fmt.Println("result "+result)
}// https://github.com/nextcaptcha/nextcaptcha-csharp
string clientKey = "YOUR_CLIENT_KEY";
string softId = ""; // Optional
string callbackUrl = ""; // Optional
bool openLog = true; // Optional
var nextCaptchaAPI = new NextCaptchaAPI(clientKey, softId, callbackUrl, openLog);
string websiteUrl = "https://example.com";
string websiteKey = "0x4XXXXXXXXXXXXXXXXX";
var result = await nextCaptchaAPI.SolveTurnstileAsync(websiteUrl, websiteKey);