Java library for antigate.com
- Download sources from https://github.com/itsimoshka/antigate-java-api.git
- Go to sources directory
- Run 'mvn clean install' (Maven should be installed previously)
- Get antigate-java-api-XX.jar from target folder
- Create config object. You can use default implementation:
AntigateConfig config = new DefaultAntigateConfig();
- Set your code:
config.setKey("your-code-here");
- Create AntigateFacade:
AntigateFacade antigate = new AntigateFacade(config);
- Send captcha file and get responce:
SendFileResponse sendFileResponse = antigate.sendFile(new URL("your-url-here"));
- Get captha ID from response:
String captchaID = sendFileResponse.getCaptchaID();
- Add get captcha status until you get result:
GetCaptchaStatusResponse getCaptchaStatusResponse = antigate.getCaptchaStatus(captchaID);