Get basic contact information
curl --request GET \
--url https://{host}/api/contacts \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/contacts"
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/contacts', 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/contacts",
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/contacts"
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/contacts")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/contacts")
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{
"contacts": [
{
"jid": "5511999999999@s.whatsapp.net",
"name": "John Silva",
"notify": "John",
"verifiedName": "John Silva",
"businessName": ""
}
]
}
Contacts
Get Basic Contact Information
Get basic information of WhatsApp contacts
GET
/
api
/
contacts
Get basic contact information
curl --request GET \
--url https://{host}/api/contacts \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/contacts"
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/contacts', 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/contacts",
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/contacts"
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/contacts")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/contacts")
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{
"contacts": [
{
"jid": "5511999999999@s.whatsapp.net",
"name": "John Silva",
"notify": "John",
"verifiedName": "John Silva",
"businessName": ""
}
]
}
Description
This endpoint allows getting basic information of contacts on WhatsApp. You can search for a specific contact by providing the JID or list multiple contacts using pagination.Query Parameters
Contact identifier (WhatsApp JID). If provided, returns only the specific contact. Format:
5511999999999@s.whatsapp.net{
"contacts": [
{
"jid": "5511999999999@s.whatsapp.net",
"name": "John Silva",
"notify": "John",
"verifiedName": "John Silva",
"businessName": ""
}
]
}
Status Codes
200- Contacts returned successfully400- Invalid parameters401- Unauthorized session404- Session not found
Usage Example
# Get specific contact
curl -X GET "https://api.wappfy.com.br/api/contacts?sessionId=my-session&jid=5511999999999@s.whatsapp.net"
# List contacts with pagination
curl -X GET "https://api.wappfy.com.br/api/contacts?sessionId=my-session&limit=50&offset=0"
// Get specific contact
const sessionId = 'my-session';
const jid = '5511999999999@s.whatsapp.net';
const response = await fetch(
`https://api.wappfy.com.br/api/contacts?sessionId=${sessionId}&jid=${jid}`
);
const data = await response.json();
console.log(data);
// List contacts with pagination
const response2 = await fetch(
`https://api.wappfy.com.br/api/contacts?sessionId=${sessionId}&limit=50&offset=0`
);
const data2 = await response2.json();
console.log(data2);
import requests
# Get specific contact
session_id = 'my-session'
jid = '5511999999999@s.whatsapp.net'
response = requests.get(
'https://api.wappfy.com.br/api/contacts',
params={
'sessionId': session_id,
'jid': jid
}
)
data = response.json()
print(data)
# List contacts with pagination
response2 = requests.get(
'https://api.wappfy.com.br/api/contacts',
params={
'sessionId': session_id,
'limit': 50,
'offset': 0
}
)
data2 = response2.json()
print(data2)
