For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReferenceClick-to-Call
GuidesReferenceClick-to-Call
  • Core
    • Overview
  • Entities
    • SignalWire
    • Address
    • Participant
    • ClientPreferences
    • SelfCapabilities
    • SelfParticipant
    • User
    • WebRTCCall
  • Web Components
    • Overview
    • sw-audio-level
    • sw-call-controls
    • sw-call-dialpad
    • sw-call-media
    • sw-call-provider
    • sw-call-status
    • sw-call-widget
    • sw-click-to-call
    • sw-device-selector
    • sw-directory
    • sw-local-camera
    • sw-participant-controls
    • sw-participants
    • sw-self-media
    • sw-ui-alert
    • sw-ui-background
    • sw-ui-call-layout
    • sw-ui-content-drawer
    • sw-ui-control-bar
    • sw-ui-dialpad
    • sw-ui-dropup
    • sw-ui-icon
    • sw-ui-modal
    • sw-ui-responsive-container
    • sw-ui-split-button
    • sw-ui-transcript-view
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Install
  • Classes
  • Credential Providers
  • Errors
  • Functions
  • Variables
  • ready
  • version
Core

SignalWire Browser SDK

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page

SignalWire

Next
Built with

Reference for the SignalWire Browser SDK — every class, error, function, interface, and type the SDK exports. If you’re new to the SDK, start with the Overview or jump straight to SignalWire, the top-level client that owns the WebSocket session and produces every other entity in the SDK.

The reference is organized by surface area. Classes are the things you interact with — the client, an active call, a participant, the directory. Functions are top-level helpers for logging, embeddable integrations, and type narrowing. Errors are the typed exceptions the SDK throws so you can branch on them with instanceof. Most stateful values are exposed in two complementary forms — a snapshot getter (audioMuted) and an observable suffixed with $ (audioMuted$) for reactive UI binding.

Install

npm

@signalwire/js

GitHub

signalwire-js

$npm install @signalwire/js@latest rxjs

RxJS is a peer dependency — the SDK uses observables for all reactive state. See the RxJS Primer.

Classes

SignalWire

Main entry point for the SignalWire Browser SDK.

Address

Represents a contact or room in the directory.

Participant

Represents a participant in a call.

SelfParticipant

The local participant in a call, with additional device and media control.

SelfCapabilities

Manages the capability state for the self participant.

User

Authenticated user profile.

ClientPreferences

Public preferences API for configuring SDK behavior.

WebRTCCall

Concrete WebRTC call implementation.

Credential Providers

EmbedTokenCredentialProvider

Exchanges an embed token for a SAT via the host’s token endpoint.

StaticCredentialProvider

Returns a fixed set of credentials.

Errors

CallCreateError

Thrown when a call cannot be created.

CollectionFetchError

Thrown when fetching a collection page fails.

DeviceTokenError

Thrown when device token issuance or validation fails.

DPoPInitError

Thrown when DPoP key initialization fails.

InvalidCredentialsError

Thrown when the SDK is rejected by the auth backend.

MediaTrackError

Thrown when a media track operation fails.

MessageParseError

Thrown when an incoming message cannot be parsed.

OverconstrainedFallbackError

Thrown when getUserMedia fails with OverconstrainedError and all fallback levels are exhausted.

PreflightError

Thrown when the preflight connectivity test fails.

RecoveryError

Thrown when a recovery attempt fails.

TokenRefreshError

Thrown when an access-token refresh fails.

UnexpectedError

Catch-all for unexpected SDK errors.

VertoPongError

Thrown when a Verto ping/pong heartbeat fails.

Functions

embeddableCall

Creates a call using an embed token for simple, embeddable integrations.

isSelfParticipant

Type guard that checks if a participant is the local SelfParticipant.

getLogger

Retrieve the current SDK logger instance.

setLogger

Replace the built-in logger with a custom implementation. Pass null to restore defaults.

setLogLevel

Set the log level for the built-in logger. No effect when a custom logger is set via setLogger().

setDebugOptions

Configure debug options (e.g., { logWsTraffic: true }).

Variables

ready

1const ready: boolean = true

Flag indicating the library has been loaded and is ready to use. For UMD builds: window.SignalWire.ready. For ES modules: import { ready } from '@signalwire/js'.

version

1const version: string = __VERSION__

Library version from package.json, injected at build time.