> Every Taji docs page as Markdown: https://docs.taji.is/llms.txt

# WhatsApp

WhatsApp as a linked device of your own number, both ways. Taji's alerts reach your chat with yourself, and you talk to your agent from your phone by messaging yourself there.

## Before you link

You need WhatsApp on your phone, on a separate number if you can: WhatsApp forbids unofficial clients and can ban your number. Taji links as one of your phone's devices, reads only the chat you have with yourself, and sends into it; it never reads another chat, group, or broadcast. No key or password goes in the vault; Taji stores the linked-device session in `<state dir>/whatsapp/`; unlinking WhatsApp signs that device out of your phone's Linked Devices and deletes the session ([Unlink](#unlink)).

## Link

The form is `whatsapp`. Start it from WhatsApp's row under Channels on the Connections page, or run `taji-link whatsapp` in a terminal (it needs a real TTY to draw the QR). Its steps and the words it refuses with are in `taji-plugin.toml`.

In the Connections sheet, click **Show the QR** to display the QR code and scan it from WhatsApp's **Linked Devices** on your phone. To link with a pairing code instead of scanning, enter your phone number (country code first) in **Your WhatsApp number** before clicking **Show the QR**; Taji displays an 8-character code under the QR. In a terminal, `taji-link whatsapp` draws the QR code on screen and prints the post-link note when the scan finishes. Open WhatsApp on your phone at least every 14 days to keep the link active.

## Use

1. **Get alerts.** Every alert Taji raises arrives as a message in your chat with yourself. Your agent sends nothing for it.
2. **Talk to your agent.** Send a text message in your chat with yourself. The Taji window can be closed. The reply is your agent's last message: the figure first, then one or two short sentences (up to 4,000 characters per message).
3. **Ask for a chart.** Say "show me" or "chart". The reply carries the chart as an attached PNG image with a caption. Without that, you get text and an offer of the picture.
4. **Start a new thread or switch agent.** Send `taji new` to start a new thread, `taji agent` to list your agents, and `taji agent <id>` to switch. Taji answers these itself; the agent never sees them.

Taji hears only text messages you send in your chat with yourself; other chats, groups, newsletters, and broadcasts are ignored.

An order's approval cannot come from your phone. On an account with approvals on, the order waits in the Taji window and your agent says so. What your agent can and cannot do is in [Connect your agent](https://docs.taji.is/guide/agent.md).

## Unlink

Unlink WhatsApp from its row under Channels on the Connections page (or `POST /verb/channels/unlink` with `{"channel": "whatsapp"}`). No open vault is needed. Taji stops the sidecar, clears pending permission cards, removes the link from its state, signs the linked device out of your phone's **Linked Devices** and deletes `<state dir>/whatsapp/`.

If Taji cannot reach WhatsApp to sign the device out, or WhatsApp does not confirm the device was removed, the unlink answers an error and the channel is unlinked all the same: unlink again once you are online, or open **WhatsApp › Linked Devices** on your phone and log out the device there.

## If it fails

| Symptom | Cause | Fix |
|---|---|---|
| The sheet refuses with `no_scan` | No phone scanned the code before the link attempt ended | Scan the QR code (or enter the pairing code) in WhatsApp on your phone, then try again |
| WhatsApp's row or sheet refuses with `logged_out` | WhatsApp signed Taji's linked device out | Link WhatsApp again from the Connections page or `taji-link whatsapp` |
| WhatsApp's row reports a `440` conflict | Another WhatsApp Web session replaced Taji's | Close the other WhatsApp Web session, then link WhatsApp again |
| A send is refused with a reachout timelock | WhatsApp's account reachout timelock is active | Wait until the timelock ends, then try again |
| Taji reports WhatsApp is not connected or the sidecar exited | The `taji-whatsapp` sidecar is not running or failed to start | Verify `taji-whatsapp` is beside the kernel (or `TAJI_WHATSAPP_SIDECAR` in dev) and restart Taji |

## References

- [How the WhatsApp integration works](https://docs.taji.is/catalog/whatsapp/architecture.md)
- [Connect your agent](https://docs.taji.is/guide/agent.md)
- [How your agent answers a phone turn](https://docs.taji.is/skill/references/channels.md)
- [Link a device](https://faq.whatsapp.com/1317564962315842)
- [Link with phone number](https://faq.whatsapp.com/1324084875126592)
- `plugins/whatsapp/taji-plugin.toml`, `plugins/whatsapp/src/lib.rs` (channel arm), `plugins/whatsapp/sidecar/main.ts` (WhatsApp sidecar)
