TPSentinel LogoTPSentinel

Quickstart

End-to-end Sentinel integration on a single page

Quickstart

This guide walks through the full Sentinel integration flow from setup to browser startup on one page.

In this example, we will treat one exam or course as a single workspace. Each student attempt becomes a separate session created under that workspace, so it uses the workspace policy automatically.

1. Generate and store your API token

Create an API token for your backend and store it securely.

Use this token only from your server-side integration when creating and managing Sentinel resources.

2. Create a workspace

Create a workspace for the course or exam you want to monitor.

A workspace acts like a folder that stores the default proctoring policy and groups related sessions together.

You can create workspaces manually from the dashboard, or automate them through your backend using the workspace creation API. A common pattern is to create a workspace when an exam or course is created in your portal, store the returned workspace ID in your backend, and then create a session under that workspace whenever a student starts an attempt.

For example:

  • Python Certification Exam can be one workspace
  • every student attempt for that exam becomes a session created under that workspace

3. Create a session and session token

When a candidate starts, your backend should:

  1. Create a session for that candidate inside the workspace.
  2. Generate a session token for that session.

At the end of this step, your frontend should have the identifiers and token it needs to start Sentinel for that candidate session.

4. Install the SDK packages

Install the core SDK and the default UI package:

npm install @testpress/sentinel-core @testpress/sentinel-ui

@testpress/sentinel-core provides the headless proctoring engine.

@testpress/sentinel-ui provides the default UI overlays for setup, consent, permissions, identity verification, warnings, and session monitoring.

5. Create Sentinel and start the default UI

On the frontend, create Sentinel with the session details returned by your backend, then create and start the default UI.

import { TPSentinel } from '@testpress/sentinel-core'
import { TPSentinelUI } from '@testpress/sentinel-ui'

const sentinel = TPSentinel.create({
  orgCode: '<organization-id>',
  sessionId: '<session-id>',
  token: '<session-token>',
})

const sentinelUI = TPSentinelUI.create({
  sentinel,
})

await sentinelUI.start()

The default overlay integrates with the headless SDK and handles the candidate-facing setup and session UI automatically.

To remove the UI completely:

sentinelUI.destroy()

What happens next

Once the session is running:

  • Sentinel applies the session policy
  • The candidate completes setup in the browser
  • Sentinel runs anomaly detection and periodic snapshots if configured in the policy
  • Events and evidence are captured for that session

From here, move to:

On this page