This example shows the smallest runnable bot in the repository. It opens a real WhatsApp connection with BaileysEx.Connection.Transport.MintWebSocket, persists credentials, and echoes inbound text messages back to the sender.

Run the example

mix run examples/echo_bot.exs -- --auth-path tmp/echo_bot_auth

On the first run, scan the QR code or use phone pairing. On later runs, the saved credentials in tmp/echo_bot_auth are reused.

What it demonstrates

Source

The runnable script lives at examples/echo_bot.exs.


See also: