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

KindShapeExample
Phone JID<number>@s.whatsapp.net, no device suffix[email protected]
LID<digits>@lid or <digits>@hosted.lid100000000000000@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:

FieldMeaning
sender_jidWho sent it. The phone JID whenever known.
sender_lidThe LID the sender arrived as. Present only when it arrived as one.
sender_pn_resolvedPresent and false only when the sender arrived as a LID and no phone number is known.
chat_jidThe conversation. In a direct chat, the phone JID whenever known. A group chat_jid is delivered as WhatsApp sent it.
chat_lidThe LID the direct chat arrived as, when it did.
chat_pn_resolvedPresent and false only when the chat arrived as a LID with no known number.

On a group.participants event:

FieldMeaning
participantsPhone JIDs wherever known.
participant_lidsLines 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_resolvedLines 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.

JSON
{
  "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.

JSON
{
  "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

JavaScript
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:

JSON
{
  "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 free

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.

WhatsApp LID vs Phone Number in Webhooks | HelloHop