To install Django REST framework reCAPTCHA, run this command in your terminal:

$ pip install djangorestframework-recaptcha

This is the preferred method to install Django REST framework reCAPTCHA, as it will always install the most recent stable release.

If you don’t have pip installed, this Python installation guide can guide you through the process.

Once the djangorestframework-recaptcha installed, add it to your INSTALLED_APPS:


Next, register yourself and obtain your reCAPTCHA credentials at

Finally, copy/paste your Google reCAPTCHA secret key to the DRF_RECAPTCHA_SECRET_KEY setting:

DRF_RECAPTCHA_SECRET_KEY = "<your_reCAPTCHA_secret_key>"



API endpoint to which to send the information to validate the reCAPTCHA response token. The default value is (cf. reCAPTCHA documentation).


Secret key of your reCAPTCHA application. Don’t forget to fill in this settings with your reCAPTCHA application secret key.