Get mapping of all known lids to phone number
curl --request GET \
--url https://{host}/api/{session}/lids \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/{session}/lids"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://{host}/api/{session}/lids', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/{session}/lids",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/{session}/lids"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/{session}/lids")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/{session}/lids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"lids": [
{
"lid": "12345678901234567890",
"phone": "5511999999999"
},
{
"lid": "09876543210987654321",
"phone": "5511888888888"
}
]
}
Contacts
Get All LID to Number Mappings
Get all LID (Local ID) to phone number mappings
GET
/
api
/
{session}
/
lids
Get mapping of all known lids to phone number
curl --request GET \
--url https://{host}/api/{session}/lids \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/{session}/lids"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://{host}/api/{session}/lids', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/{session}/lids",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/{session}/lids"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/{session}/lids")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/{session}/lids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"lids": [
{
"lid": "12345678901234567890",
"phone": "5511999999999"
},
{
"lid": "09876543210987654321",
"phone": "5511888888888"
}
]
}
Description
This endpoint returns all known mappings between LIDs (Local IDs) and phone numbers. LID is a local identifier used by WhatsApp to map contacts efficiently.URL Parameters
string
required
Unique authenticated session ID
{
"lids": [
{
"lid": "12345678901234567890",
"phone": "5511999999999"
},
{
"lid": "09876543210987654321",
"phone": "5511888888888"
}
]
}
Status Codes
200- Mappings returned successfully401- Unauthorized session404- Session not found
Usage Example
curl -X GET https://api.wappfy.com.br/api/my-session/lids
const session = 'my-session';
const response = await fetch(`https://api.wappfy.com.br/api/${session}/lids`);
const data = await response.json();
console.log(`Total LIDs: ${data.lids.length}`);
data.lids.forEach(mapping => {
console.log(`LID: ${mapping.lid} -> Phone: ${mapping.phone}`);
});
import requests
session = 'my-session'
response = requests.get(f'https://api.wappfy.com.br/api/{session}/lids')
data = response.json()
print(f"Total LIDs: {len(data['lids'])}")
for mapping in data['lids']:
print(f"LID: {mapping['lid']} -> Phone: {mapping['phone']}")
