Verificar se o número de telefone está registrado no WhatsApp
curl --request GET \
--url https://{host}/api/contacts/check-exists \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/contacts/check-exists"
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/check-exists', 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/check-exists",
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/check-exists"
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/check-exists")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/contacts/check-exists")
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{
"exists": true,
"jid": "5511999999999@s.whatsapp.net",
"isInWhatsapp": true
}
Contatos
Verificar se Número Está Registrado no WhatsApp
Verificar se um número de telefone está registrado no WhatsApp
GET
/
api
/
contacts
/
check-exists
Verificar se o número de telefone está registrado no WhatsApp
curl --request GET \
--url https://{host}/api/contacts/check-exists \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/contacts/check-exists"
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/check-exists', 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/check-exists",
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/check-exists"
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/check-exists")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/contacts/check-exists")
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{
"exists": true,
"jid": "5511999999999@s.whatsapp.net",
"isInWhatsapp": true
}
Descrição
Este endpoint verifica se um número de telefone específico está registrado e ativo no WhatsApp. Útil para validar números antes de enviar mensagens.Query Parameters
string
required
ID da sessão autenticada
string
required
Número de telefone a ser verificado (formato internacional, apenas números). Exemplo:
5511999999999{
"exists": true,
"jid": "5511999999999@s.whatsapp.net",
"isInWhatsapp": true
}
Códigos de Status
200- Verificação realizada com sucesso400- Parâmetros inválidos401- Sessão não autorizada404- Sessão não encontrada
Exemplo de Uso
curl -X GET "https://api.wappfy.com.br/api/contacts/check-exists?sessionId=my-session&phone=5511999999999"
const sessionId = 'my-session';
const phone = '5511999999999';
const response = await fetch(
`https://api.wappfy.com.br/api/contacts/check-exists?sessionId=${sessionId}&phone=${phone}`
);
const data = await response.json();
if (data.exists && data.isInWhatsapp) {
console.log(`Número ${phone} está registrado no WhatsApp!`);
console.log(`JID: ${data.jid}`);
} else {
console.log(`Número ${phone} não está no WhatsApp`);
}
import requests
session_id = 'my-session'
phone = '5511999999999'
response = requests.get(
'https://api.wappfy.com.br/api/contacts/check-exists',
params={
'sessionId': session_id,
'phone': phone
}
)
data = response.json()
if data.get('exists') and data.get('isInWhatsapp'):
print(f"Número {phone} está registrado no WhatsApp!")
print(f"JID: {data['jid']}")
else:
print(f"Número {phone} não está no WhatsApp")
Authorizations
Sua chave de API do Wappfy (obtenha em dash.wappfy.com.br)
Query Parameters
O número de telefone para verificar
