Add Whatsapp function to website, like sms, tel

I have a website that a lot of people view on mobile. I have link for : Call and SMS and I want to add one for Whatsapp, so a user can click the whatsapp link I create and start a conversation with me.

If this is possible can someone point me in the right direction on how?



below link will open the whatsapp. Here "0123456789" is the contact of the person you want to communicate with.


Check this link out Launching Your iPhone App Via Custom URL Scheme

and more on the whats up url scheme document

I did a quick mock up and tried it on my iphone with a link like this from a webpage and it opened the app on my iphone.

<a href="whatsapp://send?text=Hello%2C%20World!">whatsapp</a>

I could not try to send a message as I don't have a current Whatsapp account sorry.

Add user name using abid parameter

let's say your whatsapp username was username then it would be

<a href="whatsapp://send?abid=username&text=Hello%2C%20World!">whatsapp</a>

once again sorry I can't test this. Also I have no idea what would happen if the username is the actual user of the current mobile device. eg. You try to whatsapp yourself.


Here is the solution to your problem! You just need to use this format:

<a href=""></a>

In the place of "urlencodedtext" you need to keep the content in Url-encode format.

UPDATE-- Use this from now(Nov-2018)

<a href=""></a>


Don't use:

To create your own link with a pre-filled message that will automatically appear in the text field of a chat, use where whatsappphonenumber is a full phone number in international format and URL-encodedtext is the URL-encoded pre-filled message.


To create a link with just a pre-filled message, use


After clicking on the link, you will be shown a list of contacts you can send your message to.

For more information, see


This is possible by creating the following link:

whatsapp://send?text=Hello this has been opened from the browser&phone=+PHONENUMBER&abid=+PHONENUMBER

Thanks to:

I have tested this on iOS, Windows Phone and Android


I just posted an answer on a thread similiar to this here

The approach with:

<a href="whatsapp://send?abid=username&text=Hello%2C%20World!">whatsapp</a>

and with

<a href="intent://send/0123456789#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">whatsapp</a>

Only works if the person who clicked on your link have your number on their contact list.

Since not everybody will have it, the other solution is to use Whatsapp API like this:

<a href="">Send Message</a>

Rahul's answer gives me an error: You seem to be trying to send a WhatsApp message to a phone number that is not registered with WhatsApp..., even though I'm sending it to a registered WhatsApp number.

This, however works:

<li><a href="intent:0123456789#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end"><i class="fa fa-whatsapp"></i>+237 655 421 621</li>


where YOURNUMBER is without the two leading 00.

For instance for +37061204312 you write:

This link seems to work on mobiles and on desktop computers.

To prefill the message with text you can use:

More in the Whatsapp FAQ:


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.