#WhatsApp "relink" fails

1 messages · Page 1 of 1 (latest)

south hatch
#

After onboarding OpenClaw the first time and linked WhatsApp using the wizzard, WhatsApp worked ok, but my official WhatsApp windows App was logged out. Whenl I relinked the official WhatsApp Windows Desktop App. the OpenClaw WhatsApp linking failed and now cannot be relinked again. WhatsApp scans the ControlUI QR code but then terminates after a while with 'Couldn't log in'. Deleting and relinking the official Windows WhatsApp Desktop app works fine on the same account. I'm running OpenClaw in Docker on a QNAP NAS.
I have removed the /openclaw/config/credentials/whatsapp/default/creds.json and restarted the gateway, but to no avail.
Has anyone else experienced this and is there a fix?

cosmic mountainBOT
#

WhatsApp in OpenClaw is WhatsApp Web (Baileys), so linking OpenClaw is basically adding another “Linked device” to your WhatsApp account. The official Windows Desktop app also consumes a linked-device slot, and WhatsApp sometimes invalidates other linked sessions when you relink one device.

A couple things to try that usually fix “scan QR → waits → ‘Couldn’t log in’”:

  1. Don’t delete just creds.json — log out properly (it clears the whole auth dir)
  • In the container, run:
    • openclaw channels logout --channel whatsapp
    • then openclaw channels login --channel whatsapp (generate a fresh QR and scan immediately)

Docs: https://docs.openclaw.ai/channels/whatsapp (see Logout behavior + credential paths)

  1. On your phone, wipe Linked Devices first
  • WhatsApp (phone) → Linked devices → remove the OpenClaw/“WhatsApp Web” entries (and anything stale), then try linking OpenClaw again.
  • If you’re at/near the device limit, WhatsApp will behave weirdly.
  1. Make sure you’re deleting/clearing the right credentials directory
    Per docs the current path is:
#
  • ~/.openclaw/credentials/whatsapp/<accountId>/creds.json (plus creds.json.bak)

In Docker setups, people often delete a file in a mounted folder that isn’t actually the gateway state dir the process is using. Using channels logout avoids this mismatch entirely.

  1. If it still fails: paste the exact log lines during login
    Run a log tail while you scan:
  • openclaw logs --follow
    …and also share:
  • openclaw --version

The WhatsApp disconnect reason in the logs will tell us if it’s (a) stale auth files, (b) a WhatsApp-side rejection/cooldown, or (c) something like clock/time skew on the NAS.

Channel troubleshooting page (command ladder): https://docs.openclaw.ai/channels/troubleshooting

south hatch
#

Thank you very much. It works now. This is what I did:
First, on my phone WhatsApp → Linked Devices I removed every linked device except the Windows Desktop app, making sure there are no stale entries.
Then do a proper logout in OpenClaw:

Then immediately generated a fresh QR and scanned it:

Scan the QR code that appears in the terminal immediately — not using the Control UI, but scanning directly from the terminal output.

cosmic mountainBOT
#

Nice — that aligns with what we usually see: WhatsApp’s linked-device state gets wedged, and just deleting creds.json isn’t enough.

Two notes that are worth capturing for anyone who hits this thread later:

  • The reliable reset is: clear stale entries in WhatsApp → Linked devices, then run channels logout (not manual file deletes), then channels login and scan the new QR right away.
  • Scanning the QR from the terminal vs the Control UI often helps simply because you’re guaranteed it’s the freshest QR and you’re not fighting any UI caching / old screenshot / refresh delay.

If you want to mark this as solved so it’s indexed: right-click the solution message → Apps → ✅ Mark Solution.