Skip to Content
Identomic SDK Docs

Node.js server SDK

Authorize mobile captures and report outcomes from Node.js using @identomic/server.

View as Markdown

Install

Use Node.js 22 or later. Install the supplied package directory or tarball in your backend. The package supports ESM, CommonJS and TypeScript declarations.

Terminal
npm install ./identomic-server.tgz

Initialize and create a session

Run this code only on your backend after authorizing the signed-in caller. Use the Identomic HTTPS origin or the full /api/v1/sdk base URL. Use the same idempotency key on retries.

import { IdentomicServer } from "@identomic/server";

const identomic = new IdentomicServer({
  baseUrl: process.env.IDENTOMIC_BASE_URL,
  secretKey: process.env.IDENTOMIC_SECRET_KEY,
});

const { sessionId, sessionToken, expiresAt } = await identomic.sessions.create({
  module: "fingerprints",
  idempotencyKey: operationId,
});

Report an outcome

Call on your backend after validating the reported outcome belongs to the caller’s original operation. The reporting key needs outcome scope.

await identomic.sessions.reportOutcome({ sessionId, outcome: "completed" });

Recover from errors

Inspect IdentomicAPIError.code and status. Retry timeouts, dependency errors, and rate-limited requests with the same operation ID. Use a fresh ID for a deliberate new attempt after expiry. The public sandbox example backend is for controlled testing. Production requires authentication and authorization in your own backend.