Skip to content

Features of the CheckWhatsap method with numbers of some countries#

Contents

Canada and USA numbers
Kazakhstan and Russia numbers
Mexican numbers

Canada and USA numbers#

WhatsApp automatically matches phone numbers with the first digit "1" in the number with Canada and the USA.

Replacing the first digit "1" with values ​​equal to "10", "100", "1000" and "10000" does not change the behavior of WhatsApp, the number is considered valid. The CheckWhatsap method for the same request will return "existsWhatsapp": true in the response body. Still, the message sent to an incorrectly written number (with extra zeros) will get stuck in the sending queue and will not be sent.

Kazakhstan and Russia numbers#

The CheckWhatsap method when checking ten-digit numbers of Kazakhstan/Russia can return two different results:

  • If some Russia/KZ is connected to the instance, the method will return the answer true, since it automatically adds "7" to the number.

If a number from another country is connected to the instance, the method will return false since it considers the number foreign and will not add "7."

This is a feature of WhatsApp's behavior when checking numbers. To solve the problem, use one of the solutions:

  1. In the integration, before checking ten-digit numbers, automatically add the digit "7" to the beginning of the number.

    For sending messages converting telephone numbers like 74734567890 to 774734567890.

  2. Check RF/KZ numbers from numbers from other countries.

Mexican numbers#

Some Mexican numbers require a "1" between the country code "52" and the area code (also for operator Nextel). The "11" at the beginning must be removed. The resulting phone number will be 13 digits long: +52 1 XXX XXX XXXX.

Example of number conversion for correct sending

Original phone number +520123456789
The required number for sending messages is 5210123456789@c.us

You do not need to add the "1" in the following cases:

  • For landline numbers
  • Mobile numbers that previously did not require the addition of the "1" (This rule applies to some mobile operators)

History of the problem

Previously, for calling mobile phones in Mexico, you were required to add the "1" after the country code for international calls. This rule remains in WhatsApp for numbers classified as mobile.

Alternative solutions for sending messages correctly in WhatsApp

We recommend using the chat id from the incoming message or checking the number by creating a new chat in WhatsApp (application, web version).

Follow the direct link of the phone number https://wa.me/52xxxx. Regardless of whether or not the digit "1" is added to the number, WhatsApp will redirect it to the correct number.

For example:

  • Number 523345678910 when going to https://wa.me/5213345678910 with the addition of "1" transfer to the chat with account 523345678910, that is, the correct number is 523345678910

  • Number 5213323456789, regardless of adding "1" when going to the direct link https://wa.me/5213323456789, means the correct number is 5213323456789.

CheckWhatsapp method operation

Be careful, the CheckWhatsapp method returns true in all cases.