Create your own linkUse https://wa.me/<number> where the <number> is a full phone number in international format. Omit any zeroes, brackets, or dashes when adding the phone number in international format.
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.
********* UPDATE ADDED AT THE END *********
I've tried many approaches and I have a winner (see Test 3), here is the result of each one:
(I think the Test 3 will also work for you because if the person visiting your site doesn't have you on their contact list, it's the only option that will allow it.)
In all tests, the number had to be complete, with country and location code without any initial zeros. Example:
On tests 1 and 2, it only worked with a plus sign on the country code: +5511999999999
Test 1:
<a href="whatsapp://send?abid=phonenumber&text=Hello%2C%20World!">Send Message</a>
This way you must have the phonenumber on your contact list. It doesn't work for me because I wanted to be able to send a message to a number which I may not have on my contact list.
If you don't have the number on your contact list, it opens the Whatsapp listing all your registered contacts, so you can choose one.
It's a good option for sharing stuff.
Test 2:
<a href="intent://send/phonenumber#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">Send Message</a>
This approach only works on Android AND if you have the number on your contact list. If you don't have it, Android opens your SMS app, so you can invite the contact to use Whatsapp.
Test 3 (The Winner):
<a href="https://api.whatsapp.com/send?phone=15551234567">Send Message</a>
This was the only way that worked fully for me.
https://api.whatsapp.com/send?phone=15551234567&text=Send20%a20%quote
And if you wish to have a bookmarklet for additional ease of use, you may use this one:
javascript: (function() { var val= prompt("Enter phone number",""); if (val) location="https://api.whatsapp.com/send?phone="+escape('972' + val)+""; })()
Youll need to change the country code(or remove it) to you.r target country and paste it in the address field in a chrome/firefox link
Worth notice:
***************** UPDATE (START) *****************
Whatsapp made available other option, now you can create one link to a conversation like this:
https://wa.me/[phonenumber]
The phone number should be in international format:
Like this:
https://wa.me/552196312XXXX
NOT like this:
https://wa.me/+55(021)96312-XXXX
And if you want to add one pre-built message to your link, you can add ?text= at the end with the text URL Encoded:
https://wa.me/552196312XXXX?text=[message-url-encoded]
Exemple:
https://wa.me/552196312XXXX?text=Send20%a20%quote
More info here:
https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat
***************** UPDATE (END) *****************
The following link seems to work fine -
<a href="whatsapp://send?text=Hello World!&phone=+9198********1">Ping me on WhatsApp</a>
It opens the contact in WhatsApp app, along with the message 'Hello World!' prepopulated in the input text box.
(Tested this with google chrome on an android phone.)
Official WhatsApp doc Says-:
https://api.whatsapp.com/send?phone=countrycode+phonenumber
Use: https://api.whatsapp.com/send?phone=15551234567
Don't use: https://api.whatsapp.com/send?phone=+001-(555)1234567
https://faq.whatsapp.com/en/general/26000030
I've tried this:
<a href="whatsapp://send?abid=phonenumber&text=Hello%2C%20World!">whatsapp</a>
changing 'phonenumber' into a specific phonenumber. This doesn't work completely, but when they click on the link it does open whatsapp and if they click on a contact the message is filled in.
If you want to open a specific person in chat you can, but without text filled in.
<a href="intent://send/phonenumber#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">test</a>
You'll probably have to make a choice between the two.
some links to help you Sharing link on WhatsApp from mobile website (not application) for Android https://www.whatsapp.com/faq/nl/android/28000012
Hope this helps
(I tested this with google chrome on an android phone)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With