Get all known LID mappings
curl --request GET \
--url https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-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://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-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 => [
"Authorization: Bearer <token>"
],
]);
$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://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"lid": "1111111@lid",
"pn": "[email protected]"
},
{
"lid": "2222222@lid",
"pn": "[email protected]"
}
]{
"message": "Resource not found."
}{
"message": "The given data was invalid.",
"errors": {},
"statusCode": 422
}{
"message": "Internal Server Error"
}Get All Known LIDs
List the @lid to @c.us mappings already known by a Hypersender WhatsApp instance.
GET
/
{instance}
/
contacts
/
get-all-known-lids
Get all known LID mappings
curl --request GET \
--url https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-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://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-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 => [
"Authorization: Bearer <token>"
],
]);
$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://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-all-known-lids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"lid": "1111111@lid",
"pn": "[email protected]"
},
{
"lid": "2222222@lid",
"pn": "[email protected]"
}
]{
"message": "Resource not found."
}{
"message": "The given data was invalid.",
"errors": {},
"statusCode": 422
}{
"message": "Internal Server Error"
}Returns the linked-identifier mappings already known by this instance.
Use this endpoint when you need to:
- Build a local cache of known
@lidand@c.uspairs. - Page through large mapping sets with
limitandoffset. - Check which conversions are already available before resolving individual identifiers.
A mapping appears here only after the instance has already learned it from contact or conversation data.
Response Example
[
{
"lid": "1111111@lid",
"pn": "[email protected]"
},
{
"lid": "2222222@lid",
"pn": "[email protected]"
}
]
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
application/json
Example:
"application/json"
application/json
Example:
"application/json"
Path Parameters
Instance UUID copied from hypersender dashboard
Example:
"{{ instance_id }}"
Query Parameters
Maximum number of mappings to return
Required range:
x >= 0Example:
100
Number of mappings to skip before returning results
Required range:
x >= 0Example:
0
Response
Successful response
Linked identifier for the contact
Example:
"1111111@lid"
Phone-number-based chat ID for the same contact
Example: