Check if a number is registered on whatsapp.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.fonnte.com/validate',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array(
'target' => '08123456789,08987654321',
'countryCode' => '62'
),
CURLOPT_HTTPHEADER => array(
'Authorization: TOKEN'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Available parameter
- target (required) (string) - target number, separate with comma
- countryCode (int) - replace first zero with country code, default 62, optional
If you prefer to see on postman, see here.
Multiple numbers check can be done using comma.
TOKEN must be filled by your own token. See how to get token.
You cannot check more than 500 number at a time.
Run this API simultaneously will break previous check.
Response
Successfull response
{
"not_registered": [],
"registered": [],
"status": true
}
The registered and not registered number(s) will be listed in array
- Target required : target is empty
{
"reason": "target required",
"status": false
}
- Target invalid : target is not valid
{
"reason": "target invalid",
"status": false
}
- Token invalid : token is not valid
{
"reason": "token invalid",
"status": false
}
- Device disconnected : device must connect to use this API
{
"reason": "device disconnected",
"status": false
}