tinyreplay.
SDK

SDK API

The full TinyReplay.init() configuration and the two public methods.

The SDK exposes exactly two methods and one config object. That is the whole surface.

TinyReplay.init(config)

Starts recording the current page. Idempotent - a second call while recording is active does nothing. Never runs during SSR (window guard).

Config

OptionTypeDefaultDescription
endpointstringrequiredBase URL of your TinyReplay server, no trailing slash.
projectIdstringrequiredArbitrary project identifier (1–64 chars).
tokenstring-Ingest token. Required only if the server sets INGEST_TOKEN.
flushIntervalnumber5000Milliseconds between batch flushes.
maxDurationMsnumber1800000Max recording duration (30 min). Recording stops and flushes when reached.
maskAllInputsbooleantrueMask every input / textarea / select value at capture time.
debugbooleanfalseLog capture and flush activity to the console.
TinyReplay.init({
  endpoint: 'https://replay.example.com',
  projectId: 'checkout',
  token: 'demo-token',
  flushInterval: 5000,
  maxDurationMs: 30 * 60_000,
  maskAllInputs: true,
  debug: false,
})

The token is not a secret in the browser

Anything in client JavaScript is readable by the user. INGEST_TOKEN raises the bar against random POSTs; it does not make the token confidential. See Auth.

TinyReplay.stop()

await TinyReplay.stop(): Promise<void>

Stops recording and drains the buffer to the server. Resolves once the final batches are sent. A no-op if nothing is recording.

What's recorded

Beyond the DOM and interactions captured by rrweb, the SDK adds:

  • Console output (log / info / warn / error) via rrweb's console plugin.
  • Network metadata - method, URL, status, duration. Never headers or bodies.
  • Uncaught errors and unhandled promise rejections (message + stack).
  • SPA route changes - pushState / replaceState / popstate, used to derive the page count.

It never captures cookies, localStorage, or sessionStorage (other than its own session id), and it ignores its own ingest requests so it never records itself.

Next

Masking · Limits · Transport