How to resolve @lid (Linked ID) to actual phone number? #1858
Replies: 3 comments 2 replies
-
|
Hi! The @lid in WhatsApp is a unique identifier to replace the unique use of the phone number (JID) in contact identification. I had the same problem, but I managed to solve it with the following endpoint: curl -X 'GET' \
'{yourBaseUrl}/api/{session}/lids/{lid}' \
-H 'accept: application/json' \
-H 'X-Api-Key: {yourXApiKey}' |
Beta Was this translation helpful? Give feedback.
-
Hi Igor, have you ever had the problem with this endpoint returning the empty "np"? If so, in that case did you leave it as @lid or did you find another way to handle it? |
Beta Was this translation helpful? Give feedback.
-
This is Truegreatvoid. Yes, I've had that. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm receiving messages where the sender ID comes in @lid format (e.g., 31142858252478@lid) instead of the standard @c.us phone number format.
Environment:
WAHA version: [your version]
WhatsApp account type: Business / Personal
Issue: When certain contacts send messages, the from field returns an internal Linked ID like 31142858252478@lid rather than their actual phone number (31xxxxxxxxx@c.us).
Questions:
Is there an API endpoint to resolve @lid identifiers to actual phone numbers?
Does GET /api/contacts?contactId=31142858252478@lid work for resolving these IDs?
Is this behavior related to WhatsApp's privacy settings or specific contact types?
Are there any webhook events or settings that would return the resolved phone number instead?
What I've tried:
Using /api/contacts endpoint with the @lid identifier
Checking the message payload for alternative phone fields
Any guidance on handling @lid identifiers would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions