Skip to main content

Overview

The embeddable viewer lets you display audit log events directly in your application without proxying through your backend. You generate a short-lived JWT token scoped to specific filters, then pass it to a frontend component or iframe.

Creating a Viewer Token

Generate a token server-side using the API:

Parameters

tenant_id
string
Restrict the viewer to events for a specific tenant. Use this to show customers only their own events.
actor_id
string
Restrict the viewer to events by a specific actor.
ttl
integer
default:"3600"
Token lifetime in seconds. Minimum 60, maximum 86400 (24 hours). Default 3600 (1 hour).

Response

Embedding with an iframe

The simplest approach is an iframe:

React Component Example

A reusable React component that handles token generation and display:
Generate the token server-side and pass it as a prop:

TTL Management

Tokens are short-lived by design. For long-running pages, refresh the token before it expires:

Security

Viewer tokens are read-only. They cannot be used to ingest events, modify settings, or access any write endpoints. It is safe to expose them to end users in the browser.
The token’s JWT claims encode the filters you specified. The viewer backend validates these claims and only returns matching events. Users cannot modify the token to access events outside the specified scope.