Strophe.js is a battle-tested JavaScript library that lets you build real-time XMPP applications. It supports both BOSH (HTTP-based long-polling) and WebSocket transports, runs in browsers and Node.js, and ships with full TypeScript type definitions. Whether you’re building a chat client, a presence system, or any other XMPP-powered application, Strophe.js handles the protocol details so you can focus on your application logic.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/strophe/strophejs/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install Strophe.js via npm, CDN, or as an ES module in any environment
Quickstart
Connect to an XMPP server and send your first stanza in minutes
Core Concepts
Understand connections, stanzas, handlers, and authentication
API Reference
Full reference for every class, method, and constant in Strophe.js
Why Strophe.js?
Strophe.js has powered XMPP applications in production for over a decade. It provides a clean, callback-driven API that maps closely to the XMPP protocol while abstracting away the complexity of transport management, SASL authentication, and stanza handling.Dual Transport
Connect over BOSH (XEP-0124) or WebSocket (RFC 7395) with the same API
SASL Auth
Supports SCRAM-SHA-512/384/256/1, PLAIN, ANONYMOUS, EXTERNAL, OAuth Bearer
Stanza Builder
Fluent
$msg(), $iq(), $pres() helpers and the stx template literalEvent Handlers
Filter and respond to incoming stanzas by namespace, element name, or JID
TypeScript
Written in TypeScript with bundled type declarations for full IDE support
Plugin System
Extend the Connection class with custom plugins via
addConnectionPluginGet Started
Running in Node.js requires installing
jsdom and ws as peer dependencies. See the Installation guide for details.