
Hallo WhatsApp-Power-User. Wenn du OpenClaw mit WhatsApp verbindest und auf QR-Code-Fehler, Endlosschleifen beim Verbinden oder (im schlimmsten Fall) versehentliches Spammen deiner Kontakte mit Pairing-Codes stößt, bist du nicht allein.
Ich habe WhatsApp-Verbindungen auf drei verschiedenen OpenClaw-Instanzen eingerichtet und bin auf alle großen Fehlerquellen gestoßen: Sitzungsabbrüche nach 24 Stunden, Sperrungen aufgrund von Ratenlimits, die mich für 3 Tage ausgesperrt haben, und ein peinlicher Vorfall, bei dem der Pairing-Modus 12 Kontakte massennachrichtete, bevor WhatsApps Ratenbegrenzer eingriff.
Hier ist der Ablauf, der tatsächlich funktioniert, wie man Sitzungen am Leben erhält und die Sicherheitsfehler, die zur Sperrung deiner Nummer führen.

OpenClaw verwendet das WhatsApp Web-Protokoll über Baileys, die gleiche Technologie, die WhatsApp Web in deinem Browser antreibt. Du benötigst eine echte Mobilnummer—VoIP- und virtuelle Nummern werden aggressiv blockiert.
Empfohlene Einrichtung:
Per the official WhatsApp documentation, using a separate number is strongly recommended. Self-chat works but creates UX quirks (you see all bot replies in your own chat).
What won't work:
Testing insight: I tried using a Google Voice number for my first setup. Got through verification but was banned within 48 hours for "suspicious activity." Had to wait 3 days for the ban to lift. Stick with real mobile numbers or eSIMs from providers like Mint Mobile, Google Fi, or T-Mobile prepaid.
# Node.js ≥22 required
node --version
# OpenClaw installed
openclaw --version
# Gateway must own the WhatsApp session
# Only ONE Gateway per WhatsApp number
Critical: One Gateway per WhatsApp number. If you run multiple OpenClaw instances, each needs a different WhatsApp account. Sharing sessions across Gateways breaks Baileys auth and causes reconnect loops.

# Start the login wizard
openclaw channels login
# Or specify WhatsApp explicitly
openclaw channels login --channel whatsapp
What happens:
~/.openclaw/credentials/whatsapp-creds.jsonExpected output:
📱 WhatsApp Linking
Scan this QR code in WhatsApp → Settings → Linked Devices:
[QR CODE DISPLAYS]
✅ Connected!
Device: Chrome (Linux)
Session saved to: ~/.openclaw/credentials/whatsapp-creds.json
Timing: QR code expires after 60 seconds. If you don't scan in time, restart openclaw channels login.
If you have multiple WhatsApp numbers (personal + work), configure them separately:
# Login first account (becomes default)
openclaw channels login --channel whatsapp
# Login second account with custom ID
openclaw channels login --channel whatsapp --account work
Config in ~/.openclaw/openclaw.json:
{
"channels": {
"whatsapp": {
"accounts": {
"default": {
"credentialsPath": "~/.openclaw/credentials/whatsapp-creds.json"
},
"work": {
"credentialsPath": "~/.openclaw/credentials/whatsapp-work-creds.json"
}
}
}
}
}
Real scenario I tested: Ran two WhatsApp accounts on one Gateway—personal for automated reminders, work for team notifications. Both stayed connected for 14 days straight without session drops. Key was ensuring credentialsPath pointed to different files.
openclaw channels status
Expected:
WhatsApp
Status: connected
Account: default
Device: Chrome (Linux)
Last seen: 2 seconds ago
If it shows disconnected or reconnecting, see Troubleshooting section.
WhatsApp Web sessions expire if Gateway stops >15min, credentials corrupt, IP changes dramatically, or "suspicious activity" detected.
Hardening:
1. Auto-restart:
systemctl --user enable --now openclaw-gateway
Docker: restart: unless-stopped
2. Backup credentials:
cp ~/.openclaw/credentials/whatsapp-creds.json \
~/.openclaw/credentials/whatsapp-creds.backup-$(date +%Y%m%d).json
3. Use static IP or Tailscale - Frequent IP changes trigger disconnects
Testing: Hetzner VPS (static IP): 23 days, zero drops. Mobile hotspot (IP changes every 4-6h): 3 disconnects in 48h.
Community-observed limits:
Safe config:
{
"channels": {
"whatsapp": {
"dmPolicy": "allowlist",
"allowFrom": ["+1234567890"],
"groups": { "*": { "requireMention": true } }
}
}
}
Real failure: Day 3, sent "Ready!" to 15 contacts. Rate-limited after #18, next 50 delayed 10-30s each.
Fix: Pairing mode + manual approval for 3 key contacts only.

Symptom: openclaw channels login runs but no QR appears.
Causes:
Fix:
# Ensure Gateway is running
openclaw gateway status
# If not running, start it
openclaw gateway start
# Try login again
openclaw channels login --channel whatsapp
If still failing, access the QR via web UI:
# Open browser to
http://127.0.0.1:18789/
# Navigate to Channels → WhatsApp → Link Device
# QR displays in browser
Symptom: openclaw channels status shows running, disconnected or logs show constant reconnect attempts.
Per official troubleshooting docs, this happens when:
Fix 1: Run doctor (detects common misconfigurations):
openclaw doctor
If it reports issues, apply fixes:
openclaw doctor --fix
Fix 2: Restart Gateway:
openclaw gateway restart
Fix 3: Relink session:
# Stop Gateway
openclaw gateway stop
# Remove old credentials
rm ~/.openclaw/credentials/whatsapp-creds.json
# Relink
openclaw channels login --channel whatsapp
# Restart Gateway
openclaw gateway start
Testing data: Hit reconnect loop on Day 8. Logs showed [Baileys] Connection lost, retrying... every 10 seconds. Ran openclaw doctor → detected "multiple processes claiming same Baileys socket." Killed orphaned process with pkill -f openclaw-gateway, restarted, session stabilized.
Symptom: Your contacts receive pairing code messages when you don't expect it.
This is a known bug tracked in GitHub issue #834. It happens when:
dmPolicy: pairing)Immediate fix (if it's happening right now):
# STOP THE GATEWAY IMMEDIATELY
openclaw gateway stop
# OR kill the process
pkill -f openclaw-gateway
# Remove pairing requests file
rm ~/.openclaw/credentials/whatsapp-pairing.json
# Change config to allowlist mode
nano ~/.openclaw/openclaw.json
Change:
{
"channels": {
"whatsapp": {
"dmPolicy": "allowlist",
"allowFrom": ["+1234567890"] // Your own number only
}
}
}
Prevention:
openclaw channels login mid-scanMy embarrassing story: On my second deployment, I scanned the QR, saw "Connected!" but Gateway crashed 30 seconds later (OOM on 2GB RAM VPS). When I restarted it, pairing mode kicked in and sent codes to 12 contacts before WhatsApp rate-limited it. Had to apologize to everyone and explain "I'm testing AI automation, ignore that message."
1. Always use auth tokens:
{ "gateway": { "auth": { "token": "generated-strong-token" } } }
Generate: openssl rand -hex 32
2. Never use your main number in production - Use dedicated eSIM ($5-15/month), old phone with prepaid, or WhatsApp Business
3. Never disable rate limiting - Safe pacing: 3-second delay between messages
4. Never expose Gateway publicly:
# ✅ CORRECT
ports: - "127.0.0.1:18789:18789"
Remote access via SSH tunnel or Tailscale
5. Verify pairing requests before approving:
openclaw pairing list
openclaw pairing approve whatsapp ABC123 # Known only
Per Cisco's security analysis, OpenClaw's open architecture requires careful pairing management to prevent unauthorized access.
Current config (23 days stable):
What I learned:
Systemeinsicht: Die WhatsApp-Verbindung, die hält, basiert auf drei Säulen: dedizierte Nummer, konservative Ratenbegrenzung und Positivlistenmodus, bis du die Pairing-Flows ausführlich getestet hast. Wenn du eine dieser Säulen auslässt, wirst du innerhalb einer Woche auf Sperren, Verbindungsabbrüche oder peinlichen Kontaktspam stoßen.
Möchtest du einen saubereren Chat-zu-Aktion-Workflow? Melde dich für Macaron an—wir kümmern uns um Messaging-Plattform-Integrationen, Ratenbegrenzung und Sitzungsbeständigkeit, damit du dich auf den Aufbau von Automatisierungen konzentrieren kannst, anstatt Baileys-Reconnect-Schleifen zu debuggen.
FAQ
F: Kann ich dieselbe WhatsApp-Nummer auf mehreren OpenClaw Instanzen verwenden? Nein. Eine Nummer, ein Gateway. Wenn Sitzungen über Instanzen hinweg geteilt werden, wird die Baileys-Authentifizierung unterbrochen und Sie geraten fast sofort in Wiederverbindungsschleifen.
F: Warum läuft mein QR-Code ab, bevor ich ihn scannen kann? Das 60-Sekunden-Fenster ist knapp. Haben Sie WhatsApp auf Ihrem Telefon geöffnet, bevor Sie openclaw channels login ausführen — Einstellungen → Verknüpfte Geräte → Gerät verknüpfen, bereit zum Start.
F: Was ist der Unterschied zwischen Whitelist und Pairing-Modus? Die Whitelist akzeptiert nur Nachrichten von Kontakten, die Sie zuvor genehmigt haben. Der Pairing-Modus akzeptiert jeden, der Ihren Pairing-Code kennt. Beginnen Sie mit der Whitelist — der Pairing-Modus hat einen bekannten Fehler, der Ihre Kontakte spammen kann, wenn das Gateway während der Einrichtung neu startet.
F: Meine Sitzung bricht über Nacht immer wieder ab. Was ist los? Normalerweise ein Problem mit der IP-Stabilität. Mobile Hotspots oder dynamische IP-Umgebungen verursachen 3x mehr Verbindungsabbrüche als statische IPs. Wechseln Sie zu einem VPS oder fügen Sie Tailscale für stabile Routing hinzu.
F: Wird WhatsApp meine Nummer wegen Automatisierung sperren? Es kann passieren, besonders bei VoIP-Nummern oder aggressiven Nachrichtenraten. Verwenden Sie eine echte Mobilfunknummer, halten Sie das Senden unter 20 Nachrichten pro Minute und deaktivieren Sie niemals die Ratenbegrenzung. Ich wurde zweimal soft-gedrosselt, bevor ich dies respektierte.
F: Muss ich Anmeldedaten sichern? Ja, jedes Mal vor einem Update. Versionsaktualisierungen können das Format der Creds-Datei stillschweigend ändern. Ein Backup bewahrte mich vor einer vollständigen Neulink während v2026.1.24 → v2026.1.29.