20

Is there any way to open whatsapp application from a website being in a mobile? I know if you use whatsapp:// you can open whatsapp app, but how can I open whatsapp and create a new conversation with a given number? is it possible? thank you!

R01010010
  • 5,670
  • 11
  • 47
  • 77

7 Answers7

20

Thanks to the comments, I got my solution from them: whatsapp://send?phone=XXXXXXX

So for an spanish number +34 644 789 83 it would be

whatsapp://send?phone=3464478983
R01010010
  • 5,670
  • 11
  • 47
  • 77
16

api.whatsapp.com works well too. Use it in the same way, delete the (+) symbol and spaces in the telephone number.

<a href="https://api.whatsapp.com/send?phone=50600000000">Click to connect +506 0000 0000</a>
Federico Grandi
  • 6,785
  • 5
  • 30
  • 50
ysanmiguel
  • 451
  • 1
  • 4
  • 20
6

Solution above is working good, but for me i prefer to use both of mobile app and web.


You can use it like this (empty chat):

<p>My whatsapp +1 987654321 <a href="https://api.whatsapp.com/send?phone=0000000000">Web</a> | <a href="whatsapp://send?phone=0000000000">App</a></p>

And you can use it like this (with chat text):

<p>My whatsapp +1 987654321 <a href="https://api.whatsapp.com/send?phone=0000000000&text=example">Web</a> | <a href="whatsapp://send?phone=0000000000&text=example">App</a></p>

This will give your visitors both way to contact you from PC browser or Mobile browser.

  • change 0000000000 with your number, phone number should be with country code and without +
  • change example with your own chat message
HanLen
  • 61
  • 1
  • 3
6

This link in browser will open whatsapp aplication with chat conversation for the provided number

Wa.me/91xxxxxxxxxx
Machavity
  • 30,841
  • 27
  • 92
  • 100
  • is the domain wa.me registered by whatsapp? if not, might not be such a smart idea to pass your or other peoples phone numbers to some random website and even though wa.me redirects to whatsapp, anyone could do a forward to whatsapp. the whois data i found is inconclusive. – swisswiss May 09 '20 at 01:33
  • 1
    It is owned by Facebook/WhatsApp since it is mentioned in WhatsApp's Help Center: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/?lang=en – Ajay Gupta Aug 30 '21 at 07:33
4
<a href="https://api.whatsapp.com/send?phone=+910000000000&text=Hi, I contacted you Through your website." class="social-icon whatsapp"></a>

For web-

2

I couldn't find a single link to attend PCs and mobiles. So, I had to choose between https://web.whatsapp.com/send?phone=0000000000000 for PCs and whatsapp://send?phone=0000000000000 for mobiles.

You must consider some things:

  1. If you are in a mobile, you probably will want to open WhatsApp's app;
  2. You you are in a PC, you probably will want to open WhatsApp Web;
  3. You can have WhatsApp Desktop installed in your PC, so you probably will want to open WhatsApp there;
  4. You can't know what is the current device in a reliable way.

So, the best option to me was to show a modal dialog questioning the user how WhatsApp should be opened (app or web).

0

<a href="https://wa.me/<<your_number>>?text=<<url_encoded_text>>"</a>

example:
<a href="https://wa.me/491793666167?text=Hi%20I%20am%20Samuel%20Demir"</a>

your_number: number in international_format:
+491793666167 => 491793666167

url_encoded_text: pre-fill-text:
for space string enter %20
-> Hi I am Samuel Demir
-> Hi%20I%20am%20Samuel%20Demir

Samuel Demir
  • 59
  • 1
  • 6