Documentation
Integrate Trueguard
Everything you need to integrate fraud detection and user identification into your application. Get started in minutes with our comprehensive guides and API reference.
Quick Start
Get up and running with Trueguard in under 5 minutes.
Read guideAPI Reference
Complete reference for all Trueguard API endpoints.
Explore APIJavaScript SDK
Official SDK for JavaScript.
View SDKGet started in minutes
Getting started with Trueguard is simple: install the JavaScript package in your frontend, create a verification session, and set up an event sending to the Trueguard API in your backend.
- 1
Install the SDK
bashnpm install @trueguard/trueguard-js - 2
Initialize the client and generate a verification session
javascript// Import the SDK import { Trueguard } from "@trueguard/trueguard-js"; // Initialize the client const client = new Trueguard({ apiKey: 'your-public-key' }); // Generate verification ID const verificationId = await client.verificationSession(); - 3
In your backend, create a event with the verification ID
javascriptimport axios from 'axios'; const response = await axios.post( 'https://api.trueguard.io/v2/event', { action: "register", status: "success", verificationId, context: { ip, // Optional email, // Optional phone, // Optional }, user: { id: userId, email, // Optional }, }, { headers: { "x-api-key": 'API-KEY' }, } );
Popular topics
Support
Need help?
Can't find what you're looking for? Our support team is here to help you get the most out of Trueguard.
Contact Support