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:
- You receive a message from a contact
- 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:
- Perform an on-demand LID lookup when sending to a new contact
- Provide a clear error message explaining why the send failed
- Document this limitation clearly
Possible Solutions
- LID lookup on send: Query WhatsApp for the LID when it's not cached
- Contact sync: Periodically sync contacts to build LID mappings
- Better error handling: Surface the
no LID founderror to the user with guidance
Environment
- Channel: WhatsApp (Baileys-based)
- Issue affects: Outbound messages to new contacts
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗