Prerequisites
Before you begin, make sure you have:- A supported development environment (Node.js 22+, iOS/macOS, Android, or modern browser)
- An Ethereum wallet address for identity authentication
- Basic familiarity with async/await patterns
Quick start steps
Install the library
Choose your platform and install LibXMTP using your package manager.
- Node.js
- iOS
- Android
- WASM
Create a client
Initialize an XMTP client with your wallet credentials.
- Node.js
- Swift
- Kotlin
The client manages your local database, identity state, and network connections. Each client is bound to a single Inbox ID and Installation ID.
On first run, the client will register your installation with the XMTP network. This requires a wallet signature to prove ownership.
Create or join a group
Start a new conversation or sync existing groups from the network.
- Node.js
- Swift
- Kotlin
Next steps
Now that you have LibXMTP running, explore more advanced features:Managing groups
Add members, update metadata, and configure permissions
Content types
Send reactions, replies, attachments, and custom content
Permissions & policies
Configure who can add members, send messages, and update groups
Consent management
Block unwanted conversations and manage spam
Common patterns
Creating a direct message (DM)
Direct messages are 1:1 conversations with exactly two members:Handling errors
Always wrap LibXMTP operations in try-catch blocks:Syncing conversations
Regularly sync to stay updated with network changes:Troubleshooting
Client creation fails with 'signature required'
Client creation fails with 'signature required'
The first time a client is created, you need to provide a wallet signature to register your installation. Make sure your wallet is properly initialized and can sign messages.See Creating Clients for detailed registration flows.
Messages not appearing immediately
Messages not appearing immediately
Messages may take a few seconds to propagate through the network. Use
group.sync() to manually fetch new messages, or set up a message stream for real-time updates.Database permission errors
Database permission errors
Make sure the
dbPath directory exists and is writable by your application. On mobile platforms, use the app’s documents directory.Member not found errors when creating groups
Member not found errors when creating groups
Users must have an active XMTP installation to be added to groups. They need to have created a client at least once. Check that addresses are valid XMTP users with
client.canMessage([address]).Complete example
Here’s a complete Node.js example that ties everything together:Resources
- Installation Guide - Platform-specific setup instructions
- Core Concepts - Understand LibXMTP’s architecture
- API Reference - Complete API documentation
- GitHub Repository - Source code and examples
