Quick Start

Get up and running with gkCAPTCHA in under 5 minutes.

1. Create an Account

Sign up at our dashboard to create your account and get your API keys.

2. Create a Site

After signing in, create a new site in your dashboard. You will receive:

  • Site Key: Used in your frontend widget
  • Secret Key: Used for server-side verification (keep this secure!)

3. Install the Widget

Add the CAPTCHA widget to your HTML page:

index.html
<script src="https://gkcaptcha.gatekeeper.sa/widget/gk-captcha.js" async defer></script>

<div id="captcha-container"></div>

<script>
  window.gkCaptcha.render('captcha-container', {
    siteKey: 'your-site-key',
    onSuccess: function(token) {
      // Send token to your server for verification
    },
    onError: function(error) {
      // Handle verification error
    }
  });
</script>

4. Verify on Server

When your form is submitted, verify the token on your server:

server.js
const response = await fetch('https://gkcaptcha.gatekeeper.sa/api/v1/token/verify', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${process.env.GKCAPTCHA_SECRET_KEY}`
  },
  body: JSON.stringify({
    token: req.body.captchaToken
  })
});

const result = await response.json();
if (result.success && result.data.verified) {
  // Verification passed, process the form
} else {
  // Verification failed, reject the request
}

Next Steps