| nome | tipo | Necessario | Descrizione |
|---|---|---|---|
| type | String | SÌ | TurnstileTaskProxyless |
| websiteURL | String | SÌ | URL completo della pagina di destinazione in cui viene caricato il widget Turnstile |
| websiteKey | String | SÌ | Chiave del sito Turnstile. Disponibile nell'attributo data-sitekey dell'elemento del widget Turnstile |
| action | String | NO | Valore del parametro action per le pagine Challenge di Turnstile, disponibile nelle opzioni della chiamata turnstile.render |
| data | String | NO | Valore del parametro cData richiesto per le pagine Challenge di Turnstile |
| pagedata | String | NO | Valore del parametro chlPageData richiesto per le pagine Challenge di Turnstile |
Punto finale dell'API: https://api.nextcaptcha.com/createTask
metodo: POST
Tipo di contenuto: 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);