How To Verify A WhatsApp Number Exists

April 7, 2024

In this brief tutorial, you can learn how to validate whether a given phone number exists and can receive WhatsApp messages to improve customer communication effectiveness.

WhatsApp is well-known as the best way to directly communicate with your customers in a private, secure, direct and much cheaper way.

Although WhatsApp is extremely popular and most people worldwide use it, not all phone numbers have a WhatsApp account actively linked to them. This is because WhatsApp is an independent service from the mobile carrier, and it is up to the mobile line owner to register on WhatsApp to send and receive messages with other WhatsApp users.

Especially in business-to-customer relationships, it is crucial for reliable and effective communication to know beforehand if you can reach customers through WhatsApp, or otherwise use less effective communication channels such as SMS or Email.

And here is the magic thing: using Wassenger API you can easily and automatically validate if a phone number has WhatsApp active and can receive WhatsApp messages. You can also validate many phone numbers. It is easier than you think, so let’s dive into it 😎

Wassenger is a complete AI-optimized WhatsApp communication platform designed for smart Businesses and Teams. Click here to learn more!

Requirements

  1. Create a free account on Wassenger
  2. Connect your WhatsApp number: takes 2 minutes, literally!
  3. Obtain your API key here
  4. HTTP client using code, Postman or the Wassenger API tester

🤩 🤖 Wassenger is a complete API solution for WhatsApp. Explore more than 100+ API use cases and automate anything on WhatsApp by signin up for a free trial and get started in minutes!

How to validate phone numbers on WhatsApp

You should have a mobile phone number with the international country prefix, with only digits, no spaces and no symbols.

If you don’t have the phone numbers in a standard format, no biggie, you can also standardize multiple phone numbers using the API very easily, read more here.

Examples of standardized phone numbers in E164 format:

+14155552671 +442071838750 +551155256325 +496912345678

Preparing the HTTP API request

HTTP Method: POST

API URL (documentation page):

https://api.wassenger.com/v1/numbers/exists?token=$API_KEY

> Replace the *$API_KEY* with your Wassenger API key

HTTP request headers > Content-Type: application/json

Now let’s define the HTTP request body data in JSON format:

{
  "phone": "+14158586273"
}

> Replace the example phone number with the one you want to validate.

👉 Click here to see a live example in the HTTP API tester ✌️

Example HTTP request using the Wassenger API tester with 100+ use case examples and code generation in 15 programming languages

Evaluating the response

If the phone number exists, you will receive a 200 OK response from the API:

{
  "exists": true,
  "phone": "+14158586273",
  "wid": "14158586273@c.us",
  "isBusiness": true,
  "businessInfo": {
    "level": "verified",
    "name": "WhatsApp Business name",
    "isApi": false,
    "isSmb": true,
    "privacyMode": null
  },
  "country": {
    "code": "US",
    "name": "USA",
    "officialName": "United States of America",
    "phonePrefix": "+1",
    "flag": "🇺🇸",
    "domain": ".us",
    "currency": "USD",
    "currencyName": "United States Dollar",
    "languages": ["en"],
    "locales": ["en-US"],
    "timezones": ["America/New_York"]
  }
}

If the phone number DOES NOT exist, you will receive a 404 Not Found response from the API:

{
  "phone": "+14158586273",
  "wid": "14158586273@c.us",
  "exists": false
}

🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!

Questions?

How to validate and normalize phone number format

You can validate and standardise in format multiple phone numbers before validating if they exist on WhatsApp.

To do so, you can use the numbers validator API endpoint.

This API endpoint only validates the correct E164 format, but it does not check whether the phone number effectively exists on WhatsApp or not. For that purpose, please use the instructions provided before in this tutorial.

How many phone numbers can you validate?

Depending on your active plan subscription on Wassenger, you can validate from 2,000 up to 50,000 per month. See the pricing table for more details about each plan’s feature. During the free trial, you can validate up to 100 phone numbers.

Ready to transform your WhatsApp communication?

Start automating your customer interactions today with Wassenger

Get Started Free