reCAPTCHA

Developer's Guide

Welcome to the developer documentation for reCAPTCHA! reCAPTCHA lets you embed a CAPTCHA in your web pages in order to protect them against spam and other types of automated abuse. Here, we explain how to add reCAPTCHA to your page.

Audience

This documentation is designed for people familiar with HTML forms and server-side processing. To install reCAPTCHA, you will probably need to edit some code.

We hope you find this documentation easy to follow. Make sure to join the reCAPTCHA developer forum to give feedback and discuss the API.

Overview

API Keys

To use reCAPTCHA, you need to sign up for API keys for your site. Unless you select the "global key" option, the keys are unique to your domain and sub-domains. (By default, all keys work on "localhost" (or "127.0.0.1"), so you can always develop and test on your local machine.)

Integration

Once you've signed up for API keys, adding reCAPTCHA to your site consists of two steps and optionally a third step where you customize the widget:

  1. Client Side: Displaying the reCAPTCHA Widget (Required)
  2. Server Side: Verifying the solution (Required)
  3. Customizations (Optional)

In most Web forms, you usually have two files: the form itself with the fields, and the file with the script to process the inputs to the form. These two files correspond to steps 1 and 2 above. Therefore, in most cases you will have to modify two different files.

There are two ways to add reCAPTCHA to your site: (a) using a "plugin," or (b) writing code to communicate with our servers. We have plugins for most common applications and programming environments, and if there is one that fits your needs, we strongly encourage you to use it. If you're using one of the following programming environments or applications, click on the link below for specific instructions or plugins. Otherwise, proceed to our pages on displaying reCAPTCHA without a plugin and verifying the user's answer without a plugin.

Programming Environments:

  • PHP
  • ASP.NET
  • Classic ASP (contributed by Mark Short)
  • Java/JSP
  • Perl
  • Python
  • Ruby (contributed by McClain Looney)
  • Another Ruby library from Jason L Perry
  • Ruby/Rack (contributed by Arthur Chiu)
  • JSP Mailhide Tag (contributed by Tamas Magyar)
  • ColdFusion (contributed by Robin Hilliard)
  • WebDNA (contributed by Dan Strong)
  • Applications:

  • MediaWiki
  • phpBB
  • FormMail
  • Movable Type (contributed by Josh Carter)
  • Drupal (contributed by Rob Loach)
  • Symfony (contributed by Arthur Koziel)
  • TYPO3 (maintained by Markus Blaschke, contributed by Jens Mittag. See also the example of using the plugin)
  • NucleusCMS (contributed by Matt)
  • vBulletin (contributed by Magnus)
  • Joomla (contributed by Mark Fabrizio)
  • Joomla Community Builder (contributed by Ayan Debnath)
  • JSP Mailhide (contributed by Tamas Magyar)
  • bbPress (contributed by Rhys Wynne)
  • ExpressionEngine (contributed by Jaspaul Aggarwal)
  • FlatPress (contributed by Ross Fruen)
  • PHPKIT (contributed by Norman Huth)
  • Authentication required

    You need to be signed in with Google+ to do that.

    Signing you in...

    Google Developers needs your permission to do that.