Skip to main content

Install

Quick start

Get your publishable key from app.imarobot.ai/settings/api-keys.

API

createVerifier(options)

Returns an object with verify(), middleware(), and warmCache().

verifier.verify(token)

Success response:
Failure response:
Error values: TOKEN_REVOKED | TOKEN_EXPIRED | TOKEN_INVALID

verifier.middleware()

Express middleware. Attaches req.agent on success, returns 401 on failure.

verifier.warmCache(domains)

Pre-fetch and cache public keys for known issuer domains.
Call this at startup to eliminate cold-start latency on the first verification.

Offline mode

See Offline mode for details on when to use local-only validation.

TypeScript

The SDK ships with full TypeScript types. No @types package needed.

Source

Open source — github.com/humansandrobots/imarobot-verify