跳转到主要内容
获取令牌时遇到问题吗
联系支持

Prosopo Procaptcha

注意!

CapMonster Cloud 默认通过内置代理工作——这些代理已包含在费用内。仅当网站不接受令牌或对内置服务的访问受限时,才需要指定您自己的代理。 如果代理按 IP 授权,请将地址 65.21.190.34 加入白名单。

基于令牌的自动解决验证码方法 Prosopo Procaptcha。

请求参数

type<string>required

ProsopoTask


websiteURL<string>required

验证码页面的完整 URL。


websiteKey<string>required

在页面中找到的 siteKey 参数值。
大致格式如下:5EZU3LG31uzq1Mwi8inwqxmfvFDpj7VzwDnZwj4Q3syyxBwV


userAgent<string>optional

浏览器 User-Agent。请使用 CapMonster Cloud 当前支持的值:userAgentPlaceholder

可通过以下地址获取最新值:https://capmonster.cloud/api/useragent/actual


proxyType<string>optional

http - 普通的 http/https 代理;
https - 仅在 "http" 不起作用时尝试(某些自定义代理服务器要求);
socks4 - socks4 代理;
socks5 - socks5 代理。


proxyAddress<string>optional

代理 IP 地址 IPv4/IPv6。不允许:

  • 使用透明代理(其中客户端 IP 可见);
  • 使用来自本地网络的代理。


proxyPort<integer>optional

代理端口。


proxyLogin<string>optional

代理登录。


proxyPassword<string>optional

代理密码。

创建任务方法

POST
https://api.capmonster.cloud/createTask

请求示例

{
"clientKey": "API_KEY",
"task": {
"type": "ProsopoTask",
"websiteURL": "https://www.example.com",
"websiteKey": "your-website-key"
}
}

响应示例

{
"errorId":0,
"taskId":407533077
}

获取任务结果方法

使用方法 getTaskResult 来获取 Prosopo 的解决方案。

POST
https://api.capmonster.cloud/getTaskResult

请求示例

{
"clientKey":"API_KEY",
"taskId": 407533077
}

响应示例

{
"errorId":0,
"status":"ready",
"solution":
{
"token": "0x00016c68747470733a2f2f70726f6e6f6465332e70726f736f706f2e696fc0354550516f4d5a454463354c704e376774784d4d7a5950547a4136..."
}
}

如何获取 websiteKey

  1. 打开触发 Prosopo 验证码的网站。

  2. 转到开发者工具DevTools)→ Network,重新加载页面,并找到加载 image 的请求(例如 API 请求 https://example.prosopo.io/v1/prosopo/provider/client/captcha/image)。

  3. Request Headers 中找到 Prosopo-Site-Key 参数,复制其值并在创建请求时使用。

使用 SDK 库

显示代码(浏览器)
// https://github.com/CapMonsterCloud/capmonster-nodejs-captcha-solver

import {
CapMonsterCloudClientFactory,
ClientOptions,
ProsopoRequest
} from "@zennolab_com/capmonstercloud-client";

document.addEventListener("DOMContentLoaded", async () => {

const API_KEY = "YOUR_API_KEY"; // 请指定您的 CapMonster Cloud API 密钥

const client = CapMonsterCloudClientFactory.Create(
new ClientOptions({ clientKey: API_KEY })
);

// 不使用代理的基础示例
// CapMonster Cloud 会自动使用自己的代理
let prosopoRequest = new ProsopoRequest({
websiteURL: "https://yourwebsite.com/page-with-procaptcha",
websiteKey: "your-website-key",
});

// 使用您自己的代理的示例
// 如果您想使用自己的代理,请取消注释此代码块
/*
const proxy = {
proxyType: "http",
proxyAddress: "123.45.67.89",
proxyPort: 8080,
proxyLogin: "username",
proxyPassword: "password",
};

prosopoRequest = new ProsopoRequest({
websiteURL: "https://yourwebsite.com/page-with-procaptcha",
websiteKey: "your-website-key",
proxy,
userAgent: "userAgentPlaceholder",
});
*/

// 如有需要,可以检查余额
const balance = await client.getBalance();
console.log("Balance:", balance);

const result = await client.Solve(prosopoRequest);
console.log("Solution:", result.solution);
});
显示代码(Node.js)
// https://github.com/CapMonsterCloud/capmonster-nodejs-captcha-solver

const {
CapMonsterCloudClientFactory,
ClientOptions,
ProsopoRequest,
} = require("@zennolab_com/capmonstercloud-client");

const API_KEY = "YOUR_API_KEY"; // 请指定您的 CapMonster Cloud API 密钥

async function solveProCaptcha() {
const client = CapMonsterCloudClientFactory.Create(
new ClientOptions({ clientKey: API_KEY }),
);

// 不使用代理的基础示例
// CapMonster Cloud 会自动使用自己的代理
let prosopoRequest = new ProsopoRequest({
websiteURL: "https://yourwebsite.com/page-with-procaptcha",
websiteKey: "your-website-key",
});

// 使用您自己的代理的示例
// 如果您想使用自己的代理,请取消注释此代码块
/*
const proxy = {
proxyType: "http",
proxyAddress: "123.45.67.89",
proxyPort: 8080,
proxyLogin: "username",
proxyPassword: "password",
};

prosopoRequest = new ProsopoRequest({
websiteURL: "https://yourwebsite.com/page-with-procaptcha",
websiteKey: "your-website-key",
proxy,
userAgent: "userAgentPlaceholder",
});
*/

// 如有需要,可以检查余额
const balance = await client.getBalance();
console.log("Balance:", balance);

const result = await client.Solve(prosopoRequest);
console.log("Solution:", result.solution);
}

solveProCaptcha().catch(console.error);