Guides
WhatsApp LID vs phone number in webhooks: how to handle both
A LID is an alternate WhatsApp identifier shaped like digits@lid. WhatsApp sometimes addresses a person by LID instead of phone number. HelloHop puts the phone JID in the main field whenever it knows the number and gives the LID alongside. When no number is known, the field keeps the LID and a flag says so.
Facts (as of October 2026, API v1)
- A message event always carries sender_jid. sender_lid is added only when the sender arrived as a LID, and sender_pn_resolved only when it is false.
- Group participant events line up participant_lids and participants_pn_resolved with participants by index.
- Group and community participant lists always carry phone_resolved for each person. phone_number and lid are left out when empty.
This guide shows which webhook fields carry each value and how to handle a message whose sender is only a LID.
Two kinds of address
| Kind | Shape | Example |
|---|---|---|
| Phone JID | <number>@s.whatsapp.net, no device suffix | [email protected] |
| LID | <digits>@lid or <digits>@hosted.lid | 100000000000000@lid |
When WhatsApp used a LID, HelloHop still publishes the phone JID in sender_jid if it can work the number out.
Which fields carry what
On a message event:
| Field | Meaning |
|---|---|
| sender_jid | Who sent it. The phone JID whenever known. |
| sender_lid | The LID the sender arrived as. Present only when it arrived as one. |
| sender_pn_resolved | Present and false only when the sender arrived as a LID and no phone number is known. |
| chat_jid | The conversation. In a direct chat, the phone JID whenever known. A group chat_jid is delivered as WhatsApp sent it. |
| chat_lid | The LID the direct chat arrived as, when it did. |
| chat_pn_resolved | Present and false only when the chat arrived as a LID with no known number. |
On a group.participants event:
| Field | Meaning |
|---|---|
| participants | Phone JIDs wherever known. |
| participant_lids | Lines up with participants by index. An empty string for a participant who arrived as a phone number. Present only when at least one arrived as a LID. |
| participants_pn_resolved | Lines up by index. Present only when at least one LID could not be resolved. That entry in participants is then still its LID. |
The resolved flags appear only in the unresolved case. For a person, absent means sender_jid is already a phone JID.
Example: a message from a phone-known sender
This is an example, not a captured event.
{
"id": "evt_example_1",
"type": "message",
"session": "<CHANNEL_ID>",
"timestamp": "2026-01-01T00:00:00Z",
"payload": {
"id": "3EB0C767D26A1D8E2A41",
"chat_jid": "[email protected]",
"sender_jid": "[email protected]",
"sender_lid": "100000000000000@lid",
"chat_lid": "100000000000000@lid",
"type": "text",
"text": "hello",
"from_me": false,
"is_group": false,
"timestamp": "2026-01-01T00:00:00Z"
}
}The message came in by LID, and HelloHop resolved the number. Key your records on sender_jid. Keep sender_lid as a second identifier for the same person.
Example: a message from a LID-only sender
This is an example, not a captured event.
{
"id": "evt_example_2",
"type": "message",
"session": "<CHANNEL_ID>",
"timestamp": "2026-01-01T00:00:00Z",
"payload": {
"id": "3EB0C767D26A1D8E2A42",
"chat_jid": "100000000000000@lid",
"sender_jid": "100000000000000@lid",
"sender_lid": "100000000000000@lid",
"sender_pn_resolved": false,
"chat_lid": "100000000000000@lid",
"chat_pn_resolved": false,
"type": "text",
"text": "hello",
"from_me": false,
"is_group": false,
"timestamp": "2026-01-01T00:00:00Z"
}
}Here no phone number is known, so sender_jid holds the LID and sender_pn_resolved is false.
How to handle it in your code
- Read sender_pn_resolved. If it is false, treat sender_jid as a LID, not a phone number.
- Do not store the LID in a phone number column or format it as a number.
- Store the LID as the identifier for that person until a phone number turns up. Match later messages on sender_lid.
- When a later event or group list carries the phone JID for the same LID, attach the number to the record you already have.
const unresolved = payload.sender_pn_resolved === false;
const personKey = unresolved ? payload.sender_lid : payload.sender_jid;Group lists carry both
Group and community participant lists can show the LID next to the phone number. This excerpt is an example:
{
"jid": "[email protected]",
"phone_number": "[email protected]",
"lid": "100000000000000@lid",
"phone_resolved": true
}phone_resolved is false when HelloHop could not work out the person's number. A group's chat_jid is delivered as WhatsApp sent it.
Questions
- What is a WhatsApp LID?
- It is an alternate identifier for a WhatsApp account, written digits@lid. WhatsApp sometimes uses it in place of the phone number when it addresses a person.
- Why does my webhook show a LID instead of a phone number?
- WhatsApp addressed the person by LID and no phone number is known for it. Check sender_pn_resolved. When it is false, the field holds the LID. Key the person on sender_lid until a number arrives.
- Which field do I use as the user key?
- Use sender_jid when sender_pn_resolved is absent. When it is false, use sender_lid.
- Why is sender_pn_resolved missing from most events?
- The flag appears only when it is false. Absent means sender_jid is already a phone JID, for a person.
- Do group participants use LIDs too?
- Yes. In group.participants, check participant_lids and participants_pn_resolved. Both line up with participants by index.
Free sandbox, forever. Upgrade when you're ready.
Start freeKeep going
HelloHop is an independent WhatsApp API for developers: send and receive messages, automate groups and communities, and get signed webhooks. Not affiliated with WhatsApp or Meta. You link your own number.