Table of Contents
Validate a phone number if it exists on WhatsApp. Requires “validate_wa_phone” API permission.GET https://androidapi.net/api/validate/whatsapp
Parameter #
Field | Type | Description |
---|---|---|
secret | String | The API secret you copied from (Tools -> API Keys) page |
unique | String | WhatsApp Unique ID |
phone | String | E.164 formatted phone number |
Success Response Format #
Field | Type | Description |
---|---|---|
status | Number | List of Codes 200 = Success |
message | String | Response message |
data | Array | Array of data |
Error Response Format #
Name | Type | Description |
---|---|---|
status | Number | List of Codes 400 = Invalid parameters 401 = Invalid API secret 403 = Access denied 404 = Device doesn’t exist 500 = Something went wrong |
message | String | Response message |
data | Array | Array of data |
PHP Sample #
<?php
$apiSecret = "API_SECRET"; // your API secret from (Tools -> API Keys) page
$unique = "90cf7d40a467d5f40a39fca222c216449cb9abee73e5e2b0b321060c2ae06a8fa9e45486";
$phone = "+639184661534";
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, "https://androidapi.net/api/validate/whatsapp?secret={$apiSecret}&unique={$unique}&phone={$phone}");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($cURL);
curl_close($cURL);
$result = json_decode($response, true);
// do something with response
print_r($result);
Python Sample #
import requests
# your API secret from (Tools -> API Keys) page
apiSecret = "API_SECRET"
unique = "90cf7d40a467d5f40a39fca222c216449cb9abee73e5e2b0b321060c2ae06a8fa9e45486"
phone = "+639184661534"
r = requests.get(url = "https://androidapi.net/api/validate/whatsapp", params = {
"secret": apiSecret,
"unique": unique,
"phone": phone
})
# do something with response object
result = r.json()
Success Response #
{
"status": 200,
"message": "WhatsApp phone number is valid!",
"data": {
"jid": "639184661534@s.whatsapp.net",
"phone": "+639184661534"
}
}
Error Response #
{
"status": 400,
"message": "Invalid Parameters!",
"data": false
}