

最佳 Cloudflare Turnstile 解决方案
Cloudflare
Turnstile 解决方案
什么是 Cloudflare Turnstile
Cloudflare Turnstile 是一种验证码替代方案,它使用浏览器信号、客户端遥测和风险评分来验证用户,而无需交互式挑战。
了解更多 Cloudflare Turnstile 解决方案信息Cloudflare Turnstile 演示
如何解决 Cloudflare Turnstile - API 指南
CapSolver 自动验证码识别服务可以轻松解决 Cloudflare Turnstile,我们的服务可以通过 CapSolver 的 API 和 Chrome 中的 浏览器插件 使用。注册 CapSolver 并获取我们的验证码服务。
Step 1 : Creating a Task
Create the task with the createTask.
In the process of using turnstile, we must input websiteURL and websiteKey, other parameters are optional.
Task Object Structure
| Properties | Type | Required | Description |
|---|---|---|---|
| type | String | Required | AntiTurnstileTaskProxyLess |
| websiteURL | String | Required | The address of the target page. |
| websiteKey | String | Required | Turnstile website key. |
| metadata | Map<String,String> |
Optional | Turnstile extra data . Turnstile Documentation |
| metadata.action | String | Optional | The value of the data-action attribute of the Turnstile element if it exists. |
| metadata.cdata | String | Optional | The value of the data-cdata attribute of the Turnstile element if it exists. |
Example Request
txt
POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json
json lines
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AntiTurnstileTaskProxyLess",
"websiteURL": "https://www.yourwebsite.com",
"websiteKey": "0x4XXXXXXXXXXXXXXXXX",
"metadata": {
"action": "login", //optional
"cdata": "0000-1111-2222-3333-example-cdata" //optional
}
}
}
Example Response
json lines
{
"errorId": 0,
"status": "idle",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006" // record taskId
}
Step 2 : Getting Results
Use the getTaskResult method to get the recognition results
Depending on the system load, you will get the results within the interval of 1s to 20s
Example Request
txt
POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json
json lines
{
"clientKey": "YOUR_API_KEY",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}
Example Response
json lines
{
"errorId": 0,
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006",
"status": "ready",
"errorCode": null,
"errorDescription": null,
"solution": {
"token": "0.mF74FV8wEufAWOdvOak_xFaVy3lqIDel7SwNhw3GgpICSWwTjYfrQB8mRT1dAJJBEoP7N1sESdp6WH9cTS1T0catWLecG3ayNcjwxVtr3hWfS-dmcBGRTx4xYwI64sAVboYGpIyuDBeMIRC3W8dK35v1nDism9xa595Da5VlXKM7hk7pIXg69lodfiftasIkyD_KUGkxBwxvrmz7dBo10-Y5zvro9hD4QKRjOx7DYj9sumnkyYCDx0m4ImDIIkNswfVTWI2V22wlnpHdvMgdtKYgOIIAU28y9gtdrdDkpkH0GHcDyd15sxQGd9VjwhGZA_mpusUKMsEoGgst2rJ3zA.UWfZupqLlGvlATkPo3wdaw.38d55cd0163610d8ce8c42fcff7b62d8981495cc1afacbb2f14e5a23682a4e13",
"type": "turnstile",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
}
}
使用 CapSolver SDK 解决 Cloudflare Turnstile
支持主流验证码
轻松使用 CapSolver 解决验证码
我们确保将我们的产品集成到您的基础设施中尽可能轻松。凭借多语言支持和开箱即用的代码示例,保证您的 Web 项目能够快速轻松地启动。



确保合规监管适用于所有用户

在我们的核心价值观中,我们倡导合乎道德地使用技术以增进人类福祉,并坚决反对任何非法行为和对我们解决方案的不当使用。我们支持负责任地聚合公开可访问的数据以丰富人类生活,同时强烈谴责在未经适当授权的情况下非法收集敏感数据。如果您发现任何利用我们平台进行不当行为的个人,我们强烈建议您举报此类不端行为。为了增强信任并赋予用户更多的自主权与知识,我们推出了专门的隐私中心,旨在为个人提供更完善的工具和关于其数据权利的深入见解。

