In this example, we pass the obtained reCaptcha code through the JSON body and validate it.
Replace SECRET_CODE with the secret code obtained when creating the captcha.
To send the remote IP, you can use HTTP_CLIENT_IP or HTTP_X_REAL_IP if you are using a reverse proxy like NPM.
Finally, validate the captcha token and allow the process to continue.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/07/cropped-light_logo-5.png?resize=100%2C100&ssl=1)