Official Java client for the Private Captcha API.
Please check the official documentation for the in-depth and up-to-date information.
- Install
private-captcha-javausing Maven (inpom.xml) or Gradle (inbuild.gradle) - Instantiate
PrivateCaptchaClientand callverify()methodimport com.privatecaptcha.*; PrivateCaptchaClient client = new PrivateCaptchaClient( new PrivateCaptchaConfiguration("pc_your_api_key") ); try { VerifyOutput output = client.verify(new VerifyInput(solution)); if (output.ok()) { System.out.println("Verification successful!"); } else { System.out.println("Verification failed: " + output.getErrorMessage()); } } catch (PrivateCaptchaHttpException e) { System.err.println("HTTP error: " + e.getStatusCode()); } catch (VerificationFailedException e) { System.err.println("Verification failed after " + e.getAttempts() + " attempts"); }
This project is licensed under the MIT License - see the LICENSE file for details.
For issues with this Java client, please open an issue on GitHub.
For Private Captcha service questions, visit privatecaptcha.com.