I'm a robot

Demo

Widget Installation

Install our widget on any website to prevent humans from using your service

Step 1: Register

Step 2: Embed code

Step 3: Listen for Events

Add an event listener to your backend to listen for the robot-verification-passed events and verify result tokens.

import express from "express";

const app = express();
app.use(express.json());

app.post("/your-backend/verify-robot", async (request, response) => {
  const { resultToken } = request.body;

  const robotResponse = await fetch("https://castrio.me/im-a-robot/api/verify", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      secret: process.env.I_AM_ROBOT_SITE_SECRET,
      resultToken,
    }),
  });

  response.status(robotResponse.status).json(await robotResponse.json());
});
Copy Node.js backend code

Back to the demo