How to implement Captcha code in Angular8

Posted by Manideepgoud under Angular on 8/6/2020 | Points: 10 | Views : 1853 | Status : [Member] | Replies : 2
Hi Sheo sir,

Need some help in implementing captcha code(generating captcha code with refresh button) in Angular8.

Can some one help me in this please.


Posted by: Ishan7 on: 11/23/2020 [Member] Starter | Points: 25

Step 1: Install Angular Captcha Module
npm install angular-captcha --save

// import the Angular Captcha Module 
import { BotDetectCaptchaModule } from 'angular-captcha';

imports: [

Step 2:Set the captchaEndpoint in Your App's Frontend
import { CaptchaComponent } from 'angular-captcha'; 

export class YourFormWithCaptchaComponent {

ngOnInit(): void {
this.captchaComponent.captchaEndpoint =

Step 3:Displaying the Captcha Challenge in Your Form
<botdetect-captcha captchaStyleName="yourFirstCaptchaStyle"></botdetect-captcha>  
<input id="userCaptchaInput"
type="text" >

Step 4:Validate C#
SimpleCaptcha yourFirstCaptcha = new SimpleCaptcha();
bool isHuman = yourFirstCaptcha.Validate(userEnteredCaptchaCode, captchaId);

Manideepgoud, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Aptrontraining on: 3/1/2021 [Member] Starter | Points: 25

To start using reCAPTCHA, you need to sign up for an API key pair for your site. The key pair consists of a site key and secret key. The site key is used to invoke the reCAPTCHA service on your site or mobile application. The secret key authorizes communication between your application backend and the reCAPTCHA server to verify the user’s response. The secret key needs to be kept safe for security purposes.

Manideepgoud, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response