Installation
NPM
npm install @vocantly/sdk@beta
Yarn
PNPM
Requirements
- Node.js 16+ or modern browser
- WebSocket support (native in browsers, use
wspackage for Node.js)
Basic Setup
Browser / React / Vue / etc.
Node.js
For Node.js, the SDK uses the native WebSocket when available:Configuration Options
Example: WebSocket only (no inbox)
Example: With inbox (list + message history)
Getting Your SDK Token
Your backend issues SDK tokens viaPOST /api/v1/apps/:appId/tokens. Your frontend receives only the token—never App ID, public key, or secret key. See Issue SDK Token and SDK Authentication.
Example (backend, API key, dev):
{ "token", "expires_in", "user_id" } — return token to your frontend.
Verifying Installation
Framework Integration
React
Vue 3
Next Steps
Authentication
SDK authentication flow
Conversations
Join and manage conversations
Messaging
Send and receive messages
Examples
Complete code examples