What are the features of sending and receiving messages to numbers of different countries?#
Contents#
- Argentina numbers
- Brazil numbers
- Canada numbers
- Indian numbers
- Israel numbers
- Kazakhstan numbers
- Mexico numbers
- Russian Federation numbers
- Ukraine numbers
- USA numbers
1. Argentina Numbers#
All Argentina numbers have the country code "54".
All Argentine phone numbers have a "9" between the country code "54" and the city code.
The "15" code at the beginning shall be removed.
As a result, the phone number will include 13 digits: 549XXXXXXXXXX.
You can check the correctness of the number using the request https://wa.me/5490123456789
Required number format for sending messages 5490123456789@c.us
2. Brazilian Numbers#
All Brazilian numbers have the country code "55".
In some regions of Brazil, the number "9" is added between the local phone number and the Brazilian area code.
The list of area codes to which the number 9 shall be added: 11-19, 21, 22, 24, 27, 28.
For Brazilian numbers with other area codes, the number 9 shall be omitted.
As a result, the phone number can include 12 or 13 digits:
55219XXXXXXXX or 5521XXXXXXXX.
You can check the correctness of the number using the request https://wa.me/552112345678
Required number for sending messages:
552112345678@c.us or 5521912345678@c.us
Python code example
Install the package
```
pip install phonenumbers
```
```python
import phonenumbers
# is the only areas that whatspp updated for 9h digit
UPDATED_AREA_CODE = {"55": ["11", "12", "13", "14", "15", "16", "17", "18", "19", "21", "22", "24", "27", "28"]}
def prepare_whatsapp_number(phone):
x = phonenumbers.parse(phone, None)
country_code = str(x.country_code)
area_code = str(x.national_number)[0:2]
phone = phone.replace('+','')
updated_area = UPDATED_AREA_CODE
if updated_area.get(country_code):
area_code_updated = updated_area[country_code]
# Remove or add the 9h digit for states that were not updated
if area_code not in area_code_updated:
if len(str(x.national_number)) == 11:
phone = '%s%s%s' % (country_code, area_code, str(x.national_number)[3:])
else:
if len(str(x.national_number)) == 10:
phone = '%s%s%s%s' % (country_code, area_code,"9", str(x.national_number)[2:])
return phone
print(prepare_whatsapp_number("+559212345678"))
print(prepare_whatsapp_number("+5592912345678")) #phone number not working
```
3. Canada numbers#
All Canada numbers have the country code "1".
If there is a "0" between the country code and the state code, it shall be removed.
All numbers after the country code "1" have the state code.
As a result, the phone number will include 11 digits: 1ХХХХХХХХХХ
You can check the correctness of the number using the request https://wa.me/12123456789
Required number format for sending messages 12123456789@c.us
4. Indian Numbers#
All Indian numbers have the country code "91".
As a result, the phone number will include 12 digits: 91ХХХХХХХХХХ.
You can check the correctness of the number using the request https://wa.me/912345678901
The required number format for sending messages is 912345678901@c.us
5. Israel Numbers#
All Israel numbers have the country code "972".
After the country code "972" there is a prefix of the geographic area or operator, which begins with the digit "0". When formatting the number, this zero shall be removed.
As a result, the phone number will include 12 digits: 972ХХХХХХХХХ.
You can check the correctness of the number using the request https://wa.me/972543210987
The required number format for sending messages 972543210987@c.us
6. Kazakhstan numbers#
All Kazakhstan numbers have the country code "7".
When specifying the code 8 in the number:
- messages sent via API will be sent to a non-existent account,
- messages sent via WhatsApp will be automatically forwarded to the existing account 77473456789.
As a result, the phone number will include 11 digits: 7XXXXXXXXXX.
You can check the correctness of the number using the request https://wa.me/7777777777.
Required number format for sending messages 77473456789@c.us
7. Mexico Numbers#
All Mexico numbers have the country code "52".
Some numbers require a "1" between the country code "52" and the area code.
Adding the "1" is not required in the following cases:
- For landline numbers (e.g. fixed-line numbers)
- Mobile numbers that previously did not require the "1" to be added (This rule applies to some mobile operators)
As a result, the phone number will include 12 or 13 digits:
52ХХХХХХХХХХХ or 521ХХХХХХХХХХХ.
You can check the correctness of the number using the request https://wa.me/5210123456789. Regardless of adding the number "1" to the number, WhatsApp will redirect to the correct number.
- Number 523345678910 when going to https://wa.me/5213345678910 with the addition of 1 transfers 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, the redirect will be to the chat with the number 5213323456789.
We recommend checking the correct chatID through the methods of journals or the method GetContacts
Required number format for sending messages
520123456789@c.us or 5210123456789@c.us
8. Russian Federation numbers#
All Russian numbers have the country code "7".
When specifying the code 8 in the number:
- messages sent via API will be sent to a non-existent account.
- messages sent via WhatsApp will be automatically forwarded to the existing account 79876543210.
As a result, the phone number will include 11 digits: 7XXXXXXXXXX.
You can check the correctness of the number using the request https://wa.me/79876543210.
The required number format for sending messages is 79876543210@c.us
9. Ukraine numbers#
All Ukrainian numbers have the country code "380".
After the country code comes the two-digit region or operator code.
As a result, the phone number will include 12 digits: 380ХХХХХХХХХ
You can check the correctness of the number using the request https://wa.me/380123456789
The required number format for sending messages is 380123456789@c.us
10. USA numbers#
All USA numbers have the country code "1".
All numbers after the country code "1" have the state code.
As a result, the phone number will include 11 digits: 1ХХХХХХХХХХ
You can check the correctness of the number using the request https://wa.me/12123456789
Required number format for sending messages 12123456789@c.us