View and Embed Sessions

How to embed and share live browser sessions in your applications

Every Steel browser session comes with a debug URL that provides a flexible way to view and interact with the session. While Steel's dashboard includes a full-featured session viewer for monitoring your sessions, the debug URL feature allows you to implement custom viewing solutions in your applications and let viewers control browser sessions remotely.

PrerequisitesCopied!

  • A Steel API key

  • An active Steel browser session

  • Basic familiarity with HTML and JavaScript/Python

Getting the Debug URLCopied!

When creating a session through our API, the response includes a debugUrl.

Here's how to retrieve it using Steel’s SDKs:

from steel import Steel

client = Steel()
session = client.sessions.create()

# Get the debug URL
debug_url = session.debug_url
print(f"Debug URL: {debug_url}")

import Steel from 'steel-sdk';

const client = new Steel();
const session = await client.sessions.create();

// Get the debug URL
const debugUrl = session.debugUrl;
console.log(`Debug URL: ${debugUrl}`);

Once you have the debug URL, you can open it directly in your browser to quickly view your session.

Embedding Sessions in Your ApplicationCopied!

For production use cases, you can embed the session view in your application using an iframe:

<iframe 
  src={session.debugUrl}
  style="width: 100%; height: 600px; border: none;"
></iframe>

The view will automatically scale to fit the iframe container while maintaining aspect ratio.

Debug URLs are not authenticated. Anyone with access to a session's debug URL can view that session. Consider this when implementing session sharing features.

Configuration OptionsCopied!

Customize the embedded view using UTM parameters:

<iframe 
  src={`${session.debugUrl}?theme=light&interactive=true&showControls=true`}
  style="width: 100%; height: 600px; border: none;"
></iframe>

Available parameters:

Parameter

Type

Default

Description

theme

string

"dark"

Visual theme of the interface ("dark" or "light")

interactive

boolean

true

When enabled, viewers can interact with the page through clicks, scrolling, and navigation

showControls

boolean

true

Shows/hides the URL input and navigation controls

Common Use CasesCopied!

Sharing Session Views

Embed a read-only session view:

<iframe 
  src={`${session.debugUrl}?interactive=false&showControls=false`}
  style="width: 100%; height: 600px; border: none;"
></iframe>

Human-in-the-Loop Workflows

The debug URL feature is particularly useful for human-in-the-loop workflows, where you need to enable human intervention in automated processes. See our detailed guide on implementing human-in-the-loop workflows for more information.

TroubleshootingCopied!

  • If the iframe appears blank, ensure your session is still active and has has actions sent to it like navigating to new pages.

  • If interaction isn't working, verify that interactive=true is set

  • For sizing issues, check that your container has explicit dimensions (use the dimensions parameter when creating your session)

  • Make sure your session hasn't timed out (default timeout is 5 minutes)

What's NextCopied!

Learn more about:

Implement Human-in-the-Loop Controls

How to let users take control of Steel browser sessions

Session Lifecycle

Learn how to start and release browser sessions programatically.