Skip to content
solvepass

Node.js + Solvepass

A fetch-based client for server-side JavaScript. No SDK required, but the same task lifecycle applies.

TypeScriptNode services, serverless functions, and automation scripts.
solvepass-node.tstypescript
const key = process.env.SOLVEPASS_KEY;
const headers = {
  Authorization: `Bearer ${key}`,
  "Content-Type": "application/json",
};

const task = await fetch("https://api.solvepass.com/v1/tasks", {
  method: "POST",
  headers,
  body: JSON.stringify({
    type: "funcaptcha",
    sitekey: "ABCDEF...",
    pageurl: "https://example.com/login",
  }),
}).then((res) => res.json());

for (let attempt = 0; attempt < 60; attempt += 1) {
  const data = await fetch(
    `https://api.solvepass.com/v1/tasks/${task.id}`,
    { headers }
  ).then((res) => res.json());

  if (data.status === "completed") {
    console.log(data.solution.token);
    break;
  }
  if (data.status === "failed") throw new Error(data.error.code);
  await new Promise((resolve) => setTimeout(resolve, 1000));
}

What to check

  • Keep the key on the server. Do not expose it to the browser.
  • Use a webhook instead of polling for high-volume workflows.
  • Set a timeout that matches the challenge type.

The same three steps

  1. 01Create a task with the type, sitekey, and page URL.
  2. 02Poll the task or wait for a signed webhook.
  3. 03Use the token, or apply the clearance cookies with the same proxy and user agent.

Other integrations