WhatsApp LID to phone number API
WhatsApp increasingly sends privacy identifiers like 112893567721673@lid instead of phone numbers. Resolve them to real numbers with one request — and map numbers back to their LID — so your CRM never creates duplicate contacts.
- @lid → phone
- phone → @lid
- group participants
- no extra cost
curl "https://api.maytapi.com/api/$PID/$PHONE_ID/getContacts/lidToPhone/112893567721673@lid" \ -H "x-maytapi-key: $TOKEN"
const lid = "112893567721673@lid";
const res = await fetch(
`https://api.maytapi.com/api/${PID}/${PHONE_ID}/getContacts/lidToPhone/${lid}`,
{ headers: { "x-maytapi-key": TOKEN } }
);
const { success, data } = await res.json();
if (success) console.log(data.phone); // 1415xxxxx67lid = "112893567721673@lid"
res = requests.get(
f"https://api.maytapi.com/api/{PID}/{PHONE_ID}/getContacts/lidToPhone/{lid}",
headers={"x-maytapi-key": TOKEN},
timeout=10,
).json()
if res["success"]:
print(res["data"]["phone"]) # 1415xxxxx67{
"success": true,
"data": {
"id": "1415xxxxx67@c.us",
"name": "John Doe",
"phone": "1415xxxxx67",
"lid": "112893567721673@lid"
}
}
// hidden number or not resolvable
{ "success": false }Where you will meet @lid
LIDs show up wherever WhatsApp hides the phone number from linked devices.
-
groups
Group participants
Large or newer groups often list members as @lid instead of @c.us.
-
communities
Communities
Announcement groups and community members are commonly returned as LIDs.
-
webhook
Incoming messages
Webhook events can carry a sender or author identified only by @lid.
-
orders
Orders and replies
Message and order ids may reference the @lid form of a chat.
Convert @lid to a phone number
Pass the LID — with or without the @lid suffix — to lidToPhone. You get the chat id, name and phone number when WhatsApp exposes them.
- ✓Accepts 112893567721673@lid or 112893567721673
- ✓Returns id (@c.us), name, phone and lid
- ✓success:false when the number is hidden
curl "https://api.maytapi.com/api/$PID/$PHONE_ID/getContacts/lidToPhone/112893567721673@lid" \ -H "x-maytapi-key: $TOKEN"
const lid = "112893567721673@lid";
const res = await fetch(
`https://api.maytapi.com/api/${PID}/${PHONE_ID}/getContacts/lidToPhone/${lid}`,
{ headers: { "x-maytapi-key": TOKEN } }
);
const { success, data } = await res.json();
if (success) console.log(data.phone); // 1415xxxxx67lid = "112893567721673@lid"
res = requests.get(
f"https://api.maytapi.com/api/{PID}/{PHONE_ID}/getContacts/lidToPhone/{lid}",
headers={"x-maytapi-key": TOKEN},
timeout=10,
).json()
if res["success"]:
print(res["data"]["phone"]) # 1415xxxxx67{
"success": true,
"data": {
"id": "1415xxxxx67@c.us",
"name": "John Doe",
"phone": "1415xxxxx67",
"lid": "112893567721673@lid"
}
}
// hidden number or not resolvable
{ "success": false }Find the LID of a phone number
Going the other way is useful for matching incoming @lid events to contacts you already have. Send the number with its country code.
- ✓Number with country code, no + or spaces
- ✓Same response shape as lidToPhone
- ✓success:false if the number is not on WhatsApp
curl "https://api.maytapi.com/api/$PID/$PHONE_ID/getContacts/phoneToLid/1415xxxxx67" \ -H "x-maytapi-key: $TOKEN"
{
"success": true,
"data": {
"id": "1415xxxxx67@c.us",
"name": "John Doe",
"phone": "1415xxxxx67",
"lid": "112893567721673@lid"
}
}Resolve group participants automatically
Add refresh=true to getGroups when a participant list contains @lid entries. Maytapi refreshes the group from WhatsApp and returns members as @c.us wherever the number is available.
- ✓Works on getGroups and getGroups/{group_id}
- ✓One group query per refreshed group — use it only when you see @lid
- ✓Members who hide their number stay as @lid
curl "https://api.maytapi.com/api/$PID/$PHONE_ID/getGroups/1415xxxxx67-1574073754@g.us?refresh=true" \ -H "x-maytapi-key: $TOKEN"
curl "https://api.maytapi.com/api/$PID/$PHONE_ID/getGroups?refresh=true&sort=true&page=1" \ -H "x-maytapi-key: $TOKEN"
// before: "112893567721673@lid" // after refresh=true: "participants": [ "1415xxxxx67@c.us", "1415xxxxx43@c.us", "184412209955301@lid" // hides their number ]
Why resolve LIDs
-
Clean CRM records
Match every conversation to one contact instead of creating a new record per @lid.
-
Group and community exports
Export member lists with real numbers for moderation and reporting.
-
Bots that remember users
Keep conversation history and user state tied to the right person.
LID to phone number FAQ
Ask our support team anything over WhatsApp. Average response time is under 24 hours.
Help center →What is a WhatsApp LID?
A LID (linked identifier) is a privacy id such as 112893567721673@lid that WhatsApp uses instead of a phone number in some chats, groups and events.
Can every LID be resolved?
No. If the person hides their phone number or WhatsApp does not share it with your session, the API returns success:false and the contact stays as @lid.
Does it cost extra?
No. lidToPhone, phoneToLid and group refresh are included on every plan.
Should I call refresh=true on every getGroups request?
No. Each refreshed group costs one query to WhatsApp, so use it only when the participant list contains @lid entries or looks stale.
More WhatsApp API features

Get your key, send your first message in ten minutes
No approval, no templates, no card. Every endpoint is open for three days.