Using the RESTful CAPTCHA API

If you have problems installing or using the library, please contact us.

Confident Technologies supports many common languages and CMS platforms. If your favorite language or platform isn't supported yet, let us know. You can still use Confident CAPTCHA by directly using our RESTful CAPTCHA API.

  1. Go to the Dashboard, add a site, and then click the overview link for the new site. Take note of the Confident Technologies API Credentials.
  2. When a page with CAPTCHA is requested, POST your API credentials to http://captcha.confidenttechnologies.com/captcha. The return is HTML to inject into the form where you want the CAPTCHA.

  3. When creating the page with the CAPTCHA, add a jQuery include in the <head> section:

    <script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.min.js'></script>

  4. In the page body, add the HTML returned from the CAPTCHA API server to the form where you want Confident CAPTCHA to appear. Return this page to the user.

  5. When the user submits the form, it will include the parameters confidentcaptcha_captcha_id and confidentcaptcha_code. POST to http://captcha.confidenttechnologies.com/captcha/{captcha_id} , with the form data 'code={confidentcaptcha_code}'. The response will be 'True' if the code is correct, and 'False' if the code is incorrect. Based on the response, either accept the user's data, or generate a new Confident CAPTCHA, redisplay the form, and ask them to try again.

There are more details in the API documentation, including how to use audio CAPTCHAs, and how to authorize multiple CAPTCHAs per request using blocks.