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.
djangorestframework-recaptcha installed, add it to your
INSTALLED_APPS = ( ... "rest_framework_recaptcha", ... )
Next, register yourself and obtain your reCAPTCHA credentials at https://www.google.com/recaptcha/admin.
Finally, copy/paste your Google reCAPTCHA secret key to the
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 https://www.google.com/recaptcha/api/siteverify (cf. reCAPTCHA documentation).