# WhatsApp Rust ## Documentation ### Getting Started - [Introduction](https://whatsapp-rust.jlucaso.com/introduction.md): A high-performance, async Rust library for the WhatsApp Web API - [Installation](https://whatsapp-rust.jlucaso.com/installation.md): Add whatsapp-rust to your Rust project - [Quickstart](https://whatsapp-rust.jlucaso.com/quickstart.md): Build your first WhatsApp bot in minutes ### Core Concepts - [Architecture](https://whatsapp-rust.jlucaso.com/concepts/architecture.md): Understanding the whatsapp-rust project structure, modules, and workspace layout - [Authentication](https://whatsapp-rust.jlucaso.com/concepts/authentication.md): QR code, pair code, and passkey authentication flows in whatsapp-rust - [Events](https://whatsapp-rust.jlucaso.com/concepts/events.md): Event system, event handlers, and Event enum types in whatsapp-rust - [Storage](https://whatsapp-rust.jlucaso.com/concepts/storage.md): Choose a backend and preserve account scope, validated secrets and durable state ### Guides - [Current API contracts](https://whatsapp-rust.jlucaso.com/guides/current-api.md): Choose supported requests, message references and storage boundaries - [Primary-mobile sessions](https://whatsapp-rust.jlucaso.com/guides/mobile-sessions.md): Configure opt-in registration, primary login and companion hosting with explicit host services - [Migrating a Rust integration](https://whatsapp-rust.jlucaso.com/guides/rust-api-migration.md): Adapt a Rust integration to merged contracts and distinguish experimental changes - [Sending messages](https://whatsapp-rust.jlucaso.com/guides/sending-messages.md): Send content, preserve target identity and use request objects when you need options - [Receiving Messages](https://whatsapp-rust.jlucaso.com/guides/receiving-messages.md): Learn how to handle incoming messages, decrypt content, and send receipts in whatsapp-rust - [Media Handling](https://whatsapp-rust.jlucaso.com/guides/media-handling.md): Learn how to upload and download media with encryption in whatsapp-rust - [Group management](https://whatsapp-rust.jlucaso.com/guides/group-management.md): Create a group and choose the least expensive projection for each task - [Newsletters (channels)](https://whatsapp-rust.jlucaso.com/guides/newsletters.md): Learn how to create, manage, and interact with WhatsApp newsletter channels in whatsapp-rust - [Community management](https://whatsapp-rust.jlucaso.com/guides/communities.md): Create a community safely and manage linked subgroups without losing partial failures - [Polls and quizzes](https://whatsapp-rust.jlucaso.com/guides/polls.md): Create a poll once and reuse its validated reference for voting and decryption - [VoIP Calls](https://whatsapp-rust.jlucaso.com/guides/voip-calls.md): Place and answer end-to-end encrypted 1:1 voice and video calls with whatsapp-rust - [Custom Backends](https://whatsapp-rust.jlucaso.com/guides/custom-backends.md): Learn how to implement custom storage, transport, and HTTP backends for whatsapp-rust ### Advanced - [Signal Protocol Implementation](https://whatsapp-rust.jlucaso.com/advanced/signal-protocol.md): Deep dive into end-to-end encryption, Double Ratchet algorithm, and Signal Protocol in whatsapp-rust - [WhatsApp Binary Protocol](https://whatsapp-rust.jlucaso.com/advanced/binary-protocol.md): Deep dive into WhatsApp's custom binary serialization format, node marshaling, and protocol specifics - [State Management & Persistence](https://whatsapp-rust.jlucaso.com/advanced/state-management.md): Device state management, PersistenceManager, and the DeviceCommand pattern in whatsapp-rust - [WebSocket & Noise Protocol](https://whatsapp-rust.jlucaso.com/advanced/websocket-handling.md): NoiseSocket, connection management, handshake protocol, and frame handling in whatsapp-rust - [Observability with tracing](https://whatsapp-rust.jlucaso.com/advanced/observability.md): Wire whatsapp-rust into tracing-subscriber or OpenTelemetry with the optional tracing feature, redacted JIDs, and a wa.* span taxonomy. - [Metrics with the metrics facade](https://whatsapp-rust.jlucaso.com/advanced/metrics.md): Emit Prometheus and OTLP-ready wa_* counters, histograms, and gauges from whatsapp-rust with the opt-in metrics feature. - [WAM telemetry](https://whatsapp-rust.jlucaso.com/advanced/wam-telemetry.md): Emit WhatsApp Metrics (WAM) — the binary telemetry buffer the official client uploads about itself — from a generated event catalog, behind an opt-in native plugin. - [Inbound Durability Hook](https://whatsapp-rust.jlucaso.com/advanced/inbound-durability.md): Commit encrypted inbound messages before acknowledgment, within backend and retention limits - [Retry admission](https://whatsapp-rust.jlucaso.com/advanced/retry-admission.md): Configure synchronous policies for inbound retry repair and automatic decrypt-failure requests - [History Sync Admission Hook](https://whatsapp-rust.jlucaso.com/advanced/history-sync-admission.md): Opt in to rejecting inbound history-sync chunks before they enter the sync queue, without changing the SDK's default behavior. - [Native plugins](https://whatsapp-rust.jlucaso.com/advanced/plugins.md): Build type-safe, capability-scoped extensions for whatsapp-rust behind the opt-in plugins feature, with build-time registration and generation-scoped lifecycle ownership. - [Codegen flags for performance](https://whatsapp-rust.jlucaso.com/advanced/build-flags.md): Optional target-feature flags you can set for roughly a fifth fewer instructions on the Signal encrypt paths — and why whatsapp-rust does not set them for you. ## API Reference ### Core - [Client](https://whatsapp-rust.jlucaso.com/api/client.md): Core client for WhatsApp connectivity and protocol operations - [Bot](https://whatsapp-rust.jlucaso.com/api/bot.md): High-level builder for creating WhatsApp bots with event handlers - [Error Types](https://whatsapp-rust.jlucaso.com/api/errors.md): Typed error reference for all whatsapp-rust public APIs ### Messaging - [Sending and message actions](https://whatsapp-rust.jlucaso.com/api/send.md): Send content and address edits, reactions, revokes, pins and keeps with typed references - [download](https://whatsapp-rust.jlucaso.com/api/download.md): Download and decrypt media from WhatsApp messages - [upload](https://whatsapp-rust.jlucaso.com/api/upload.md): Upload and encrypt media for sending in messages - [Media reupload](https://whatsapp-rust.jlucaso.com/api/media-reupload.md): Recover expired media with a typed message reference and media key - [receipt](https://whatsapp-rust.jlucaso.com/api/receipt.md): Send read receipts, delivery receipts, and played receipts ### Features - [Groups](https://whatsapp-rust.jlucaso.com/api/groups.md): Choose group projections, construct inputs and manage group state - [Contacts](https://whatsapp-rust.jlucaso.com/api/contacts.md): Contact lookup, profile picture, and user info operations - [Profile pictures](https://whatsapp-rust.jlucaso.com/api/pictures.md): Look up contact, group and community pictures with an explicit route and outcome - [Presence](https://whatsapp-rust.jlucaso.com/api/presence.md): Online/offline status and presence subscription operations - [Chatstate](https://whatsapp-rust.jlucaso.com/api/chatstate.md): Typing indicators and chat state notifications - [Blocking](https://whatsapp-rust.jlucaso.com/api/blocking.md): Block and unblock contacts, manage blocklist - [Bots](https://whatsapp-rust.jlucaso.com/api/bots.md): Fetch WhatsApp's directory of first-party AI bots - [Status updates](https://whatsapp-rust.jlucaso.com/api/status.md): Post status content and keep message IDs separate from operation stanza IDs - [Profile](https://whatsapp-rust.jlucaso.com/api/profile.md): Manage your own profile - push name, status text, and profile picture - [Chat actions](https://whatsapp-rust.jlucaso.com/api/chat-actions.md): Archive, pin, mute, delete chats, star messages, and mark chats as read - [Labels](https://whatsapp-rust.jlucaso.com/api/labels.md): Create, delete, and associate WhatsApp chat labels, and react to label changes from linked devices - [Quick Replies](https://whatsapp-rust.jlucaso.com/api/quick-replies.md): Create, edit, and delete WhatsApp Business quick replies, and react to changes from linked devices - [Privacy](https://whatsapp-rust.jlucaso.com/api/privacy.md): Privacy settings management - fetch, update, and configure account privacy - [Business](https://whatsapp-rust.jlucaso.com/api/business.md): Business profile operations, catalog and collection browsing, order lookup, and business profile/cover photo management - [MEX (GraphQL)](https://whatsapp-rust.jlucaso.com/api/mex.md): Execute typed GraphQL queries and mutations via Meta Exchange persisted operations - [Newsletter](https://whatsapp-rust.jlucaso.com/api/newsletter.md): Newsletter (channel) operations — create, manage, administer, subscribe, and send messages to WhatsApp channels - [Communities](https://whatsapp-rust.jlucaso.com/api/community.md): Create communities, configure subgroups and recover partial remote creation - [Polls](https://whatsapp-rust.jlucaso.com/api/polls.md): Create polls and quizzes, vote and decrypt with a borrowed creation reference - [Calendar events](https://whatsapp-rust.jlucaso.com/api/events.md): Create an event and send RSVP responses with its named creation result - [Spam reporting](https://whatsapp-rust.jlucaso.com/api/spam-report.md): Report messages and contacts as spam to WhatsApp - [TC Token](https://whatsapp-rust.jlucaso.com/api/tctoken.md): Manage trusted contact privacy tokens and cstoken fallback - [Signal](https://whatsapp-rust.jlucaso.com/api/signal.md): Low-level Signal protocol operations for encryption, decryption, and session management - [USync](https://whatsapp-rust.jlucaso.com/api/usync.md): Typed USync query engine for user sync, device lists, profiles, and bot metadata ### Storage & Backends - [Storage tasks](https://whatsapp-rust.jlucaso.com/api/store.md): Implement validated backend reads and separate SQLite database operations from account scope - [Transport Trait](https://whatsapp-rust.jlucaso.com/api/transport.md): Network transport abstraction and WebSocket implementation - [HTTP Client Trait](https://whatsapp-rust.jlucaso.com/api/http-client.md): HTTP client abstraction and ureq implementation for media operations ### Core Modules - [wacore](https://whatsapp-rust.jlucaso.com/api/wacore.md): Platform-agnostic WhatsApp protocol implementation - [waproto](https://whatsapp-rust.jlucaso.com/api/waproto.md): Protocol Buffers definitions for WhatsApp messages > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Portuguese (3 pages)](https://whatsapp-rust.jlucaso.com/_llms/pt.txt): Documentação. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.