Skip to content

Quick Integration Guide

Get up and running with LR Shield in under 5 minutes. Follow the steps below.

01

Store Secret Server-Side

Keep your long-lived API key in env or a secret manager.

Create Account
02

Issue Collector Session

Generate a short-lived browser token from your backend with POST /api/collector/session.

03

Collect Securely

Use the collector session or server-side API calls without exposing the long-lived key.

04

Monitor

Visit your dashboard to monitor usage and tune thresholds.

Open Dashboard

SDK Code Snippets

// Server-side only: keep the long-lived API key off-browser
const axios = require('axios');

const session = await axios.post(
  'https://api.lrdefender.lightningresearch.ai/api/collector/session',
  { origin: 'https://app.example.com', ttlSeconds: 120, maxUses: 3 },
  { headers: { 'X-API-Key': process.env.LR_SECRET_API_KEY } }
);

console.log(session.data.sessionToken);