| tên | kiểu | Yêu cầu | Sự miêu tả |
|---|---|---|---|
| type | String | Đúng | TurnstileTaskProxyless |
| websiteURL | String | Đúng | URL đầy đủ của trang đích nơi widget Turnstile được tải |
| websiteKey | String | Đúng | Khóa trang Turnstile. Có thể tìm thấy trong thuộc tính data-sitekey của phần tử widget Turnstile |
| action | String | KHÔNG | Giá trị tham số action cho trang Challenge Turnstile, từ các tùy chọn gọi turnstile.render |
| data | String | KHÔNG | Giá trị tham số cData cần thiết cho trang Challenge Turnstile |
| pagedata | String | KHÔNG | Giá trị tham số chlPageData cần thiết cho trang Challenge Turnstile |
Điểm cuối API: https://api.nextcaptcha.com/createTask
phương pháp: POST
Loại nội dung: 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);