Skip to main content
WhatsApp addresses users two ways, and zapo surfaces both. Understanding the distinction matters as soon as you touch groups, because WhatsApp is migrating group identities to LID for privacy.

PN vs LID

A LID (“linked identity”) is a stable, opaque identifier that represents a user without exposing their phone number. WhatsApp increasingly uses LIDs in groups and communities so members can interact without sharing their number.

Addressing mode

When sending into a group, the message is addressed to participants either by PN or by LID — the addressingMode: 'pn' | 'lid'. zapo resolves this automatically: it scans the group participants and uses lid if any participant is a LID, otherwise pn. The server can confirm or override the choice, which is reflected back in the publish result:
You normally don’t set this yourself — it’s derived from the group’s membership.

What you get on an incoming message

WaIncomingMessageEvent.key carries both identifiers when the server provides them. In groups the sender is key.participant; in 1:1 chats it is key.remoteJid. Each gets a parallel *Alt field with the alternate addressing.
So in a LID-addressed group you’ll typically see key.participant as a @lid and key.participantAlt as the phone JID (if the server shares it).

Replying — which JID to use

client.message.send accepts either a PN or a LID JID and normalizes the target for you, so you rarely have to convert:
Always prefer sending by LID when you have one. The LID is the privacy-preserving, forward-compatible identity WhatsApp is migrating to — addressing a peer by LID is the future-proof choice and avoids leaking/relying on phone numbers. Fall back to the PN only when no LID is available.Get the LID from the incoming event’s key.participantAlt / key.remoteJidAlt (when the primary is a PN) or resolve it with getLidsByPhoneNumbers.
In a group, always reply to event.key.remoteJid (the group JID), not to a participant’s JID. For 1:1 chats, prefer the peer’s LID; event.key.remoteJid also works whether it is a PN or a LID.

Mapping a phone number to its LID

To resolve LIDs for a set of phone numbers, use the profile coordinator:
Each SignalLidSyncResult carries:

Telling “no account” from “no answer”

Before 1.11.0 a number with no WhatsApp account, a number the usync did not answer for, a contact error and a usync protocol error all came back identically as exists: false, invalid: false — so a caller could not tell a real negative from a failed lookup, and retrying was a guess. status separates them:
A usync protocol error is attached to every entry that got no verdict, so a whole failed query surfaces as 'unanswered' entries carrying the same error rather than as silent negatives.A <user> node with no jid — how the server reports a rejected number — is no longer dropped: its contact echo maps it back to the number you queried and the verdict comes from the contact type, as WhatsApp Web does. exists and invalid keep the meanings they always had.

LID changes

A user’s LID can change (server-side, for privacy). When it does, you receive a mex_notification of kind lid_change:
zapo handles the underlying Signal-session bookkeeping; this event is for your own caches/bookkeeping.

Where PN ↔ LID linkage is stored

Several app-state schemas track the relationship and sync it across your devices (see chat mutations):

Signal sessions

Signal sessions are keyed by the canonical JID (PN or LID) plus device id. zapo canonicalizes hosted server variants (hosted.lid → lid, hosted → s.whatsapp.net) before lookups, and maintains sessions for both addressing forms. If you ever need to force a fresh session sync for a peer, use:
With no options this call only ensures a session, so before 1.11.0 a stale session was never replaced and reason="identity" never reached the wire. If you were calling it to recover from a broken session, pass { force: true }.The old boolean form (syncSignalSession(jid, true)) maps to reasonIdentity and is deprecated.
Last modified on October 28, 2026