Developer Documentation

Integrate Peabody Secure's identity verification directly into your application.

1. Embeddable Widget (Easiest)

The widget provides a complete, pre-built UI for capturing ID documents and performing liveness checks. It injects a modal overlay into your application.

Installation

Add the script to your page:

<script src="https://peabodysecure.com/js/peabody-widget.js"></script>
Usage

Initialize and open the widget when your user clicks a button:

// Initialize with your configuration
PeabodySecure.init({
    baseUrl: 'https://peabodysecure.com', 
    token: 'YOUR_USER_JWT_TOKEN', // Optional: if performing server-to-server auth
    onSuccess: function(verificationId) {
        console.log('Verification completed! ID:', verificationId);
        // Send this verificationId to your backend to fetch results
    },
    onError: function(error) {
        console.error('Verification failed:', error);
    }
});

// Open the Verification Modal
PeabodySecure.open();

View Live Demo


2. REST API (Custom UI)

If you prefer to build your own UI, you can interact directly with our API endpoints.

Authentication

The API supports Authorization: Bearer <token> header for authentication, allowing secure calls from your backend or client-side apps.

Documentation