WWP Engine Docs
Guides

Connect a WhatsApp Client

Create a client, scan the WhatsApp QR code, and verify worker health

A client represents one connected WhatsApp account. WP Engine starts a dedicated worker for each client, stores auth state in Redis, and uses the worker to send and receive messages.

Before you start

Confirm these services are reachable from the server app:

ServiceUsed for
PostgreSQLClient ownership, flows, auth, run history
MongoDBWhatsApp chats, contacts, and messages
RedisWhatsApp auth state, QR polling, worker cache
Event RedisRaw WhatsApp event queue for flow execution

Create the client

  1. Open /clients in the dashboard.
  2. Click the create action.
  3. Enter a name that identifies the number or team, such as Sales Inbox.
  4. Continue to start the worker.

The dashboard asks the server to create the client and start the matching worker. Worker desired state is stored with the client, so container boot can reconcile workers that should be running.

Scan the QR code

When the QR dialog opens:

  1. Open WhatsApp on your phone.
  2. Go to Linked devices.
  3. Scan the QR code shown in the dashboard.
  4. Keep the dialog open until the dashboard reports the connection.

QR values are short-lived. If the QR expires, close the dialog and restart the worker from the row action menu.

Understand statuses

StatusMeaningNext action
Awaiting QRWorker is waiting for WhatsApp pairingScan the QR code
ConnectedWorker is authenticated and readyPublish flows or send messages
StoppedWorker is not runningStart or restart from the dashboard
ErrorWorker failed or disconnected unexpectedlyCheck server logs, then restart

Verify the connection

After the client is connected:

  1. Open /contacts/[clientId] from the Clients row menu.
  2. Fetch or inspect contacts if available.
  3. Send a test WhatsApp message to the connected number from another account.
  4. Check the flow runs page after publishing a matching flow.

Incoming group, broadcast, and newsletter messages are ignored by the event ingestion layer. Test with a direct one-to-one chat.

Safe operations

ActionUse when
RestartThe worker is stuck, QR expired, or connection state looks stale
StopYou want to pause automation without deleting the client
RenameThe dashboard label is unclear
DeleteThe client should be removed from the dashboard

Deleting a client is destructive for dashboard ownership and related records. Stop the worker first if you need a clean shutdown window.

Troubleshooting

QR code stays on loading

Check WP_ENGINE_API_URL, WP_ENGINE_API_KEY, REDIS_URL, and server logs. The web app must be able to call the server, and the server must be able to store QR state in Redis.

WhatsApp says the QR is invalid

Restart the worker and scan the newest QR. Do not reuse screenshots of old QR codes.

Client disconnects after a deploy

Check whether the worker process restarted and whether Redis auth state is persistent. If auth state was lost, reconnect by scanning a new QR code.

On this page