Schedule a demo with an expertSchedule demo
Back to documentation
Guide10 min

Fast start

Configure your first ID with JAAK.

1

Get your credentials from API

First, you need to create an account at JAAK and get your credentials from API.

  1. Register platform.jaak.ai
  2. Go to Setup → API Kys
  3. Generates a new API Key for your environment (sandbox or production)
  4. Keep your API _ KEY and API _ SECRET

Important: Don't put your INDIVIDUAL _ INDIVIDUAL API in code from the client's side.

2

Install the SDK

Install the SDK of JAAK in your project:

npm
npm install @ jaak / sdk
yarN
yarn add @ jaak / sdk
3

Configure the client

Initiates JAAK with your credentials:

JavaScript / TypeScript
import { JaakClient } from '@jaak/sdk';

const jaak = new JaakClient({
  apiKey: process.env.JAAK_API_KEY,
  apiSecret: process.env.JAAK_API_SECRET,
  environment: 'sandbox' // o 'production'
});
4

Create your first check

Create a check session and get the link for the user:

JavaScript / TypeScript
// Crear una sesión de verificación
const session = await jaak.verification.create({
  type: 'identity',
  config: {
    documentTypes: ['ine', 'passport'],
    livenessCheck: true,
    faceMatch: true
  },
  metadata: {
    userId: 'user_123',
    orderId: 'order_456'
  },
  redirectUrl: 'https://tuapp.com/verificacion-completada'
});

console.log(session.verificationUrl);
// https://verify.jaak.ai/session/abc123

// Redirige al usuario a session.verificationUrl
5

Receives result

Configure a web hole to get the result of the check:

Express.js example
app.post('/webhooks/jaak', async (req, res) => {
  const { event, data } = req.body;

  // Verifica la firma del webhook
  const isValid = jaak.webhooks.verify(
    req.headers['x-jaak-signature'],
    req.body
  );

  if (!isValid) {
    return res.status(401).send('Invalid signature');
  }

  if (event === 'verification.completed') {
    const { sessionId, status, result } = data;

    if (status === 'approved') {
      // Usuario verificado exitosamente
      console.log('Verificación aprobada:', result);
    } else {
      // Verificación rechazada
      console.log('Verificación rechazada:', result.reason);
    }
  }

  res.status(200).send('OK');
});

That's it!

The user will be redirected to JAAK To complete his monitoring and you will get the result through web gain.