JSPM

azcaptcha

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q43839F
  • License MIT

A modern js wrapper for the AZcaptcha API.

Package Exports

  • azcaptcha

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (azcaptcha) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

azcaptcha 🤖

A simple & modern javascript wrapper for https://azcaptcha.com/ captcha solving API.

Currently only supporting reCaptcha v3.

Install

$ npm install azcaptcha

Usage

const azcaptcha = require('azcaptcha');

(async () => {
  const captcha = new AzCaptcha('<API_KEY>')
  try {
    if (await captcha.isBalanceGreaterThan(2)) {
      const taskId = await captcha.createTask('<SITE_KEY>', '<PAGE_URL>')
      console.log(taskId);
      //=> '402049'
    }
  } catch (err) {
    console.log(err);
    //=> 'INVALID SITE KEY etc ...'
  }
})();

Methods

createTask - create captcha solving request

createTask('<SITE_KEY>', '<PAGE_URL>')

getTaskResult - get captcha task result

getTaskResult('<TASK_ID>')

pollTaskResult - poll captcha task result

pollTaskResult('<TASK_ID>', '<DELAY>', '<ATTEMPTS>')

getBalance - get account balance

getBalance()

isBalanceGreaterThan - check account balance

isBalanceGreaterThan(10)