Get phone number by LID
curl --request GET \
--url https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-phone-number-by-lid \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-phone-number-by-lid"
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-phone-number-by-lid', 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-phone-number-by-lid",
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-phone-number-by-lid"
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-phone-number-by-lid")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-phone-number-by-lid")
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]"
}{
"message": "Resource not found."
}{
"message": "The given data was invalid.",
"errors": {},
"statusCode": 422
}{
"message": "Internal Server Error"
}Get Phone Number by LID
Resolve an @lid value to its @c.us chat ID when the mapping is already known by your Hypersender instance.
GET
/
{instance}
/
contacts
/
get-phone-number-by-lid
Get phone number by LID
curl --request GET \
--url https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-phone-number-by-lid \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-phone-number-by-lid"
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-phone-number-by-lid', 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-phone-number-by-lid",
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-phone-number-by-lid"
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-phone-number-by-lid")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/get-phone-number-by-lid")
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]"
}{
"message": "Resource not found."
}{
"message": "The given data was invalid.",
"errors": {},
"statusCode": 422
}{
"message": "Internal Server Error"
}Resolves a linked identifier to its phone-number-based chat ID.
Pass the
If the mapping is missing, your instance does not currently know how to convert that
@lid value as a query parameter named lid.
You can send either the full identifier, such as
1111111@lid, or only the numeric part when that fits your integration.@lid value.
Response Example
{
"lid": "1111111@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
The linked identifier to resolve. You can send either the full value like 1111111@lid or just the numeric part.
Example:
"1111111@lid"
Response
Successful response
Linked identifier for the contact
Example:
"1111111@lid"
Phone-number-based chat ID for the same contact
Example: