> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run the WhatsApp gateway

> Run the WhatsApp channel gateway for iCommerce agents.

# Run the WhatsApp gateway

This guide helps you connect WhatsApp to iCommerce agent workflows.

## Prerequisites

* WhatsApp account with access to Linked Devices
* iCommerce CLI installed
* Database path for iCommerce (`--db`)

## Connect WhatsApp and run the gateway

1. Start the gateway and display the QR code.
2. Scan the QR code in WhatsApp → Linked Devices.
3. Store credentials in `~/.stateset/whatsapp-auth/`.
4. Re-run to reconnect automatically.

```bash theme={null}
stateset-whatsapp --db ./store.db
```

<Tip>
  Use `--apply` only when you are ready to allow write actions.
</Tip>

## Verify the result

Send a test message to the connected WhatsApp account and confirm the agent responds.

## Related tasks

* [Messaging Channels with iCommerce](/stateset-icommerce-messaging-channels)
* [iCommerce Agent](/stateset-icommerce-agent)
