|
| 1 | +bestcaptchasolver-client - Bestcaptchasolver JS client API library |
| 2 | +========================================= |
| 3 | + |
| 4 | +Bypass image captcha and reCAPTCHA with bestcaptchasolver service, JS library |
| 5 | + |
| 6 | +## Installation |
| 7 | + |
| 8 | + npm install bestcaptchasolver-client |
| 9 | + |
| 10 | +or |
| 11 | + |
| 12 | + git clone https://github.com/bestcaptchasolver/bestcaptchasolver-javascript |
| 13 | + |
| 14 | +## Usage |
| 15 | + |
| 16 | +Promises are used inside the library, for better code management |
| 17 | + |
| 18 | +Simply require the module, set the auth details and start using the captcha service: |
| 19 | + |
| 20 | +``` javascript |
| 21 | +<!-- Load jQuery (dependency) --> |
| 22 | +<script src="http://code.jquery.com/jquery-3.3.1.min.js"></script> |
| 23 | +<!-- Load the API library --> |
| 24 | +<script src="../lib/bestcaptchasolver.js"></script> |
| 25 | +``` |
| 26 | + |
| 27 | +Set access token, before using the library |
| 28 | + |
| 29 | +``` javascript |
| 30 | +bestcaptchasolverapi.set_access_token('access token from /account'); |
| 31 | +``` |
| 32 | + |
| 33 | + |
| 34 | +**Get balance** |
| 35 | + |
| 36 | +``` javascript |
| 37 | +bestcaptchasolverapi.account_balance().then(function (balance) { |
| 38 | + console.log('Balance: $', balance); |
| 39 | +}) |
| 40 | +``` |
| 41 | + |
| 42 | +**Submit image captcha** |
| 43 | + |
| 44 | +The submission of image captcha is done by sending us the image as a b64 encoded string. |
| 45 | +There's the `case_sensitive` parameter as well, which is optional, and by default `false` |
| 46 | + |
| 47 | +``` javascript |
| 48 | +bestcaptchasolverapi.submit_captcha({ |
| 49 | + b64image: captcha, |
| 50 | + //case_sensitive: true, |
| 51 | +}); |
| 52 | +``` |
| 53 | + |
| 54 | +**Submit reCAPTCHA** |
| 55 | + |
| 56 | +The `page_url` and `site_key` are the only requirements. There are other optional parameters though. |
| 57 | + |
| 58 | +``` javascript |
| 59 | +bestcaptchasolverapi.submit_recaptcha({ |
| 60 | + page_url: 'bestcaptchasolver.com', |
| 61 | + site_key: '6LfGJmcUAAAAALGtIb_FxC0LXm_GwOLyJAfbbUCN', |
| 62 | + //user_agent: 'Your user agent', |
| 63 | + //proxy: 'abc:[email protected]:4321 or 12.35.56.78:4321', |
| 64 | + //type: '1', // 1 - normal, 2 - invisible, 3 - v3 |
| 65 | + //v3_action: '', // v3 action |
| 66 | + //v3_min_score: '0.3', // if v3, score to target |
| 67 | +}); |
| 68 | +``` |
| 69 | + |
| 70 | +Just like the image submission method, this method also returns an ID, which is then used |
| 71 | +to get the text or gresponse. |
| 72 | + |
| 73 | +**Retrieve** |
| 74 | + |
| 75 | +Retrieval is done by passing the ID |
| 76 | + |
| 77 | +``` javascript |
| 78 | +bestcaptchasolverapi.retrieve_captcha(id); |
| 79 | +``` |
| 80 | + |
| 81 | +This method returns an object, with the `text` attribute for image captcha or `gresponse` if submission was done for reCAPTCHA |
| 82 | + |
| 83 | +**Affiliate ID** |
| 84 | + |
| 85 | +```javascript |
| 86 | +bestcaptchasolverapi.set_affiliate_id('ID of affiliate from /account'); |
| 87 | +``` |
| 88 | + |
| 89 | +**Set captcha bad** |
| 90 | + |
| 91 | +```javascript |
| 92 | +bestcaptchasolverapi.set_captcha_bad(captcha_id); |
| 93 | +``` |
| 94 | + |
| 95 | +## Examples |
| 96 | +Check the example/example.html |
| 97 | + |
| 98 | +## License |
| 99 | +API library is licensed under the MIT License |
| 100 | + |
| 101 | +## More information |
| 102 | +More info about the API parameters can be found [here](https://bestcaptchasolver.com/captchabypass-api) |
| 103 | + |
| 104 | + |
| 105 | +<sup><sub>captcha, bypasscaptcha, decaptcher, decaptcha, 2captcha, deathbycaptcha, anticaptcha, |
| 106 | +bypassrecaptchav2, bypassnocaptcharecaptcha, bypassinvisiblerecaptcha, captchaservicesforrecaptchav2, |
| 107 | +recaptchav2captchasolver, googlerecaptchasolver, recaptchasolverpython, recaptchabypassscript</sup></sub> |
| 108 | + |
0 commit comments