Beta Token Turnstile API
POSThttps://api.yxai-tech.top/captcha/token/turnstile

提交站点密钥与页面地址,自动完成 Cloudflare Turnstile 验证并返回可用令牌。

请求头

acceptstring
指定服务器返回的响应格式。
请选择
authorizationstring
Bearer token

请求体

website_keystring必填参数
目标网站的 Cloudflare Turnstile sitekey(站点密钥),用于标识待识别的验证码实例。
website_urlstring必填参数
部署了 Cloudflare Turnstile 验证码的目标网站 URL。
asyncboolean
When true, the server creates a managed asynchronous task and returns HTTP 201 with task_id and trace_id. The server continues processing even if the client disconnects or never polls. POST /captcha/tasks is an optional status query that does not drive task processing; the first ready-result read keeps the existing one-time settlement behavior. A successful task is charged once when the client first retrieves the ready result, matching the existing behavior; a task that is not ready by the 120-second deadline ends as HTTP 504 timeout and is not charged.
cdatastring
可选参数,仅当目标网站为 Turnstile 组件设置了自定义 cData 时才需要传递。
actionstring
可选参数,仅当目标网站为 Turnstile 组件设置了自定义 action 时才需要传递。

响应

集成指南

Shell

Python

JavaScript

Java

Go

PHP

温馨提示:对于流式请求,上面的代码可能不完全适用。请参阅对接文档以进行更改。

Cloudflare Turnstile 验证码识别服务
允许用通用余额

启用「允许通用余额」后,专属余额不足将自动使用通用余额。