WhatsApp: Support LID lookup for contacts without prior conversation

Resolved 💬 2 comments Opened Jan 31, 2026 by paulotrakto Closed Jan 31, 2026

Problem

When trying to send messages to WhatsApp contacts that don't have a prior conversation history, the send fails with no LID found error.

Context

WhatsApp has transitioned to using LID (Linked ID) instead of just phone numbers for message routing. The LID mapping is only created when:

  1. You receive a message from a contact
  2. You have an existing conversation with them

This means sending to "new" contacts (ones without LID mapping in the local credential store) fails silently or with an error.

Current Behavior

  • Sending to contacts with existing LID mapping: ✅ Works
  • Sending to contacts without LID mapping: ❌ Fails

Expected Behavior

The gateway should either:

  1. Perform an on-demand LID lookup when sending to a new contact
  2. Provide a clear error message explaining why the send failed
  3. Document this limitation clearly

Possible Solutions

  1. LID lookup on send: Query WhatsApp for the LID when it's not cached
  2. Contact sync: Periodically sync contacts to build LID mappings
  3. Better error handling: Surface the no LID found error to the user with guidance

Environment

  • Channel: WhatsApp (Baileys-based)
  • Issue affects: Outbound messages to new contacts

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗