すべてのデモ
APIの例

BotBye

BotBye検証タスクの準備方法を確認できます。

APIプレイグラウンド

リクエストとレスポンスを確認。

パラメーターを変更するとコードに反映されます。このプレビューはAPIに送信せず、実際のチャレンジも解きません。

01パラメーターを準備
02タスクを作成
03結果を取得

例のパラメーター

botbye
このページでは秘密キーを要求しません。
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "botbye",
    "websiteURL": "https://solucaptcha.com/"
  }
}

POST https://api.solucaptcha.com/createTask。YOUR_API_KEYは自分のサーバー上でのみ置き換えてください。

連携の例

demo.mjs
import { setTimeout as sleep } from "node:timers/promises";

const API = "https://api.solucaptcha.com";
const clientKey = process.env.SOLUCAPTCHA_API_KEY;
if (!clientKey) throw new Error("Set SOLUCAPTCHA_API_KEY");
const task = {
  "type": "botbye",
  "websiteURL": "https://solucaptcha.com/"
};

async function post(path, body) {
  const response = await fetch(API + path, {
    method: "POST", redirect: "error",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ clientKey, ...body }),
    signal: AbortSignal.timeout(15000),
  });
  if (!response.ok) throw new Error("HTTP " + response.status);
  const data = await response.json();
  if (data.errorId !== 0) throw new Error(data.errorDescription || "API_ERROR");
  return data;
}

const { taskId } = await post("/createTask", { task });
if (!taskId) throw new Error("Missing taskId");
let completed = false;
for (let attempt = 0; attempt < 120; attempt++) {
  await sleep(2500);
  const result = await post("/getTaskResult", { taskId });
  if (result.status === "completed") {
    console.log(result.solution); completed = true; break;
  }
  if (result.status === "failed") throw new Error("Task failed");
  if (!["pending", "processing"].includes(result.status)) throw new Error("Unexpected status");
}
if (!completed) throw new Error("Timeout: resume polling taskId=" + taskId);

実際のタスクを実行するには、アカウントのキーを使い料金を確認してください。成功時のみ課金されます。

料金を見る
他のサービスを見る