dbypass
v1.0.0
Published
Official JavaScript SDK for dbypass — Cloudflare Turnstile, reCAPTCHA v2/v3, and WAF bypass API client
Downloads
23
Maintainers
Readme
dbypass
Official JavaScript/TypeScript SDK for dbypass — CAPTCHA solving & Cloudflare bypass API
Features
- ✅ Cloudflare Turnstile solver
- ✅ Cloudflare 5s Challenge / WAF clearance bypass
- ✅ reCAPTCHA v2 solver
- ✅ reCAPTCHA v3 score token solver
- ✅ Async task queue with webhook support
- ✅ API key & proxy management
- ✅ Real-time stats & logs
- ✅ Supports CommonJS (
require) and ES Modules (import) - ✅ Full TypeScript types included
Installation
npm install dbypassQuick Start
Get your API Key from dbypass.biz.id.
CommonJS (require)
const { DbypassClient } = require('dbypass');
const client = new DbypassClient({
apiKey: 'your-api-key', // Get API Key at https://dbypass.biz.id
baseUrl: 'https://api.example.com', // optional (default)
});
// Solve Cloudflare Turnstile
const result = await client.solveTurnstile({
url: 'https://example.com/page-with-turnstile',
});
console.log(result.token); // cf-turnstile-response tokenES Modules (import)
import { DbypassClient } from 'dbypass';
const client = new DbypassClient({ apiKey: 'your-api-key' });
const result = await client.solveTurnstile({
url: 'https://example.com/page-with-turnstile',
});
console.log(result.token);TypeScript
import { DbypassClient, TurnstilePayload, SolveResult } from 'dbypass';
const client = new DbypassClient({ apiKey: process.env.DBYPASS_API_KEY! });
const payload: TurnstilePayload = { url: 'https://example.com' };
const result: SolveResult = await client.solveTurnstile(payload);API Reference
new DbypassClient(options)
| Option | Type | Required | Default | Description |
|-----------|----------|----------|--------------------------------|------------------------------------|
| apiKey | string | ✅ | — | Your dbypass API Key (Get here) |
| baseUrl | string | ❌ | https://api.example.com | Custom server base URL |
| timeout | number | ❌ | 120000 | Request timeout (ms) |
Solver Methods
client.solveTurnstile(payload)
Solve a Cloudflare Turnstile CAPTCHA.
const result = await client.solveTurnstile({
url: 'https://target.com', // required
siteKey: '0x4AAAAAAA...', // optional
});
// result.token — the cf-turnstile-response tokenclient.solveCloudflare(payload)
Bypass Cloudflare 5s Challenge and get clearance cookies.
const result = await client.solveCloudflare({
url: 'https://cloudflare-protected.com', // required
headless: true, // optional (default: true)
proxy: 'http://user:pass@ip:port', // optional
timeout: 30, // optional (seconds)
});
// result.cookies — array of cookies including cf_clearance
// result.userAgent — User-Agent string usedclient.solveRecaptchaV2(payload)
Solve a reCAPTCHA v2 challenge.
const result = await client.solveRecaptchaV2({
url: 'https://site-with-recaptcha.com', // required
siteKey: '6LeIxAcT...', // optional
});
// result.token — g-recaptcha-response tokenclient.solveRecaptchaV3(payload)
Get a reCAPTCHA v3 score token.
const result = await client.solveRecaptchaV3({
sitekey: '6LeIxAcT...', // required
url: 'https://site-with-recaptcha.com', // required
action: 'submit', // optional
});
// result.token — reCAPTCHA v3 tokenStats & Monitoring
// Real-time queue & solver stats
const stats = await client.getStats();
// Full system health check
const health = await client.getHealth();
// 90-day uptime + RAM + load info
const sysStatus = await client.getSystemStatus();
// Recent traffic logs (default: 50 entries)
const logs = await client.getLogs(100);
// RAM & queue history
const history = await client.getResourceHistory();API Key Management
// List all API keys
const { keys } = await client.listKeys();
// Create a new key
const { key } = await client.createKey({
name: 'My Bot',
dailyLimit: 500,
role: 'user',
});
// Delete a key
await client.deleteKey(key.id);Proxy Management
// List proxies
const { proxies } = await client.listProxies();
// Add a proxy
await client.addProxy('http://user:[email protected]:8080');
// Remove a proxy
await client.deleteProxy(1);Async Tasks (with Webhook)
For long-running solve jobs, use async tasks.
// Create a task (optionally with webhook)
const { task } = await client.createTask({
type: 'turnstile',
url: 'https://target.com',
webhook_url: 'https://your-server.com/webhook', // optional
});
// Poll until done
const doneTask = await client.pollTask(task.id, {
intervalMs: 3000, // check every 3s
maxWaitMs: 120000, // give up after 2 min
});
console.log(doneTask.result);Error Handling
All methods throw an Error on failure. The error includes:
err.message— Human-readable errorerr.status— HTTP status codeerr.response— Raw API response body
try {
const result = await client.solveTurnstile({ url: 'https://example.com' });
} catch (err) {
console.error(`[${err.status}] ${err.message}`);
console.error(err.response);
}Node.js Compatibility
| Node.js | Support |
|---------|---------|
| >= 18 | ✅ Native fetch |
| 16 – 17 | ✅ Install node-fetch manually: npm install node-fetch |
| < 16 | ❌ Not supported |
License
MIT © Deni
