Skip to main content

JavaScript SDK

The official JavaScript SDK for DialStack lets you embed voice capabilities directly into your application with ready-to-use components for call logs, voicemails, and more.

Distribution Targets

The SDK is available in three distribution formats:

TargetImportUse Case
Main@dialstack/sdkReact applications with full component support
Pure@dialstack/sdk/pureVanilla JavaScript / Web Components only
Server@dialstack/sdk/serverNode.js backend for session creation and API calls

Installation

npm install @dialstack/sdk

Quick Example

import { initialize, DialstackComponentsProvider, CallLogs } from '@dialstack/sdk';

const dialstack = initialize({
publishableKey: 'pk_live_YOUR_KEY',
});

function App() {
return (
<DialstackComponentsProvider dialstack={dialstack} clientSecret={clientSecret}>
<CallLogs />
</DialstackComponentsProvider>
);
}

What's Included

Embedded Components

  • CallHistory - Display recent call history in a compact format
  • CallLogs - Display call history with filtering, pagination, and formatting
  • Voicemails - List voicemails with audio playback and transcription

Server SDK

  • Accounts - Create and manage customer accounts
  • Users - Manage users within accounts
  • Sessions - Create secure session tokens for embedded components

Next Steps