[NOWEB] - direct message without phone number (@lid problems)
Describe the bug
We are receiving direct message without identify the phone number. The contact does not exists in the phone. We are not able to identify the phone number by lid.
Version
Get the WAHA version by calling GET /api/version
{ "version": "2025.6.4", "engine": "NOWEB", "tier": "PLUS", "browser": null }
Webhook payload
{ "id": "evt_01jyewpavw2ns6gc9j48ta562t", "session": "WAHA-PV-11807", "event": "message", "payload": { "id": "false_4639135154355@lid_297A4A9CC7BD7B111D49B72C8832D6D3", "timestamp": 1750699027, "from": "4639135154355@lid", "fromMe": false, "source": "app", "body": "Tudo indo. Sim", "hasMedia": false, "media": null, "ack": 2, "ackName": "DEVICE", "replyTo": null, "_data": { "key": { "remoteJid": "4639135154355@lid", "fromMe": false, "id": "297A4A9CC7BD7B111D49B72C8832D6D3" }, "messageTimestamp": 1750699027, "pushName": "rochafabiano31", "broadcast": false, "message": { "extendedTextMessage": { "text": "Tudo indo. Sim", "previewType": "NONE", "contextInfo": { "expiration": 7776000, "ephemeralSettingTimestamp": "1741704825", "disappearingMode": { "initiator": "INITIATED_BY_ME", "trigger": "ACCOUNT_SETTING", "initiatedByMe": true } }, "inviteLinkGroupTypeV2": "DEFAULT" }, "messageContextInfo": { "deviceListMetadata": { "senderTimestamp": "1748188745", "recipientKeyHash": "EWokRA4dJO96qQ==", "recipientTimestamp": "1748645964" }, "deviceListMetadataVersion": 2, "messageSecret": "f90rSW9ZMiW/l35PVBbwZjrz/yjDKEHEkoCbqJ+k12Q=" } }, "status": 3 } }, "timestamp": 1750699027324, "me": { "id": "[email protected]", "pushName": "Recepção" }, "engine": "NOWEB", "environment": { "version": "2025.6.4", "engine": "NOWEB", "tier": "PLUS", "browser": null } }
Im having the same issue.
New contacts message me on WhatsApp through private conversations every day. In all of these cases, the initial messages are identified using the @c.us format. However, in some cases, after a while, the messages from that same contact stop coming with @c.us and instead start being identified as @lid.
I found this odd, because when the identifier switches to @lid, even the message structure in the API response changes. That alone would be fine — I adapted my logic to handle this by using the API endpoint /api/{session}/lids/{lid} to retrieve the corresponding c.us.
In some cases, this works — I can get the phone number from the lid and match it back to the contact.
But in other cases, like the one shown in the screenshot I'm sharing, the PN field comes back as null. That means I have no way to link this lid to a phone number, leaving me stuck.
Here are some examples of the firsts messages: response_1751505105744.json
And some examples of the same conversation but after it changes to @lid: response_1751505255484.json
Im having the same issue, any updates?
I'm experiencing this issue as well, and because of it, I'm missing some messages. This is causing problems and affecting the credibility of my system with my clients. Are you currently working on a fix?
Hi! Lid to phone number mapping work better in 2025.7.4, NOWEB
https://waha.devlike.pro/docs/how-to/contacts/#api---lids
You'll still receive @lid as chat id, but on the first message it usually send a mapping for such lids (and also for some contacts) so you can lookup it later with
GET /api/{session}/lids/{lid}
{
"lid": "123123123@lid",
"pn": "[email protected]"
}
pn is chat id in phone number format
👉 pn can be null in case of old chats or if contact doesn't share his phone number.
lid => pn mapping shouldn't change (but who knows Meta), so you can cache it on your app side to avoid calling API to get the mapping
Hello, @devlikepro
Same problem here with this version
"environment": { "version": "2025.6.6", "engine": "GOWS", "tier": "PLUS", "browser": "/usr/bin/chromium" }
Was this fixed too ?