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.
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
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:
In the place of "urlencodedtext" you need to keep the content in Url-encode format.
UPDATE-- Use this from now(Nov-2018)
Don't use: https://wa.me/+001-(555)1234567
To create your own link with a pre-filled message that will automatically appear in the text field of a chat, use https://wa.me/whatsappphonenumber/?text=urlencodedtext 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 https://wa.me/?text=urlencodedtext
After clicking on the link, you will be shown a list of contacts you can send your message to.
For more information, see https://www.whatsapp.com/faq/en/general/26000030
This is possible by creating the following link:
whatsapp://send?text=Hello this has been opened from the browser&phone=+PHONENUMBER&abid=+PHONENUMBER
I have tested this on iOS, Windows Phone and Android
I just posted an answer on a thread similiar to this here https://stackoverflow.com/a/43357241/3958617
The approach with:
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="https://api.whatsapp.com/send?phone=15551234567">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>
YOURNUMBER is without the two leading
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: https://faq.whatsapp.com/en/android/26000030/
©2020 All rights reserved.