Quick Start

Start in minutes

Our SDKs make it easy to integrate AffirmID authentication with just a few lines of code.

// Install the SDK
npm install @affirmid/node

// Initialize the client
import { AffirmID } from '@affirmid/node';

const affirmid = new AffirmID({
  apiKey: process.env.AFFIRMID_API_KEY
});

// Create an authentication request
const authRequest = await affirmid.auth.create({
  userId: 'user_123',
  application: 'My App',
  ipAddress: req.ip,
});

// Check the status
const status = await affirmid.auth.get(authRequest.id);
console.log(status.decision); // 'approved' | 'denied' | 'pending'

Need help getting started?

Our developer success team is here to help you integrate AffirmID quickly and correctly.