-5

In my holiday site I want to add whatsapp communication with visitor. I need whatsapp api to let visitors contact us on whatsapp. I have check multiple solution for this but don't find any solution yet for this.

I need functionality like below

whatsapp

Vimal Patel
  • 73
  • 1
  • 3
  • 5

1 Answers1

1

WhatsApp provides a custom URL (whatsapp://send?text=) to send message with WhatsApp. WhatsApp's Click to Chat feature allows you to begin a chat with someone without having their phone number saved in your phone's address book. As long as you know this person’s phone number, you can create a link that will allow you to start a chat with them. By clicking the link, a chat with the person automatically opens. Click to Chat works on both your phone and WhatsApp Web.

https://api.whatsapp.com/send?phone=number here

usage :

 <a href=" https://api.whatsapp.com/send?
 phone=whatsappphonenumber&text=urlencodedtext">send</a>

where whatsappphonenumber is a full phone number in international format and urlencodedtext is the URL-encoded pre-filled message.

Edison Augusthy
  • 1,535
  • 17
  • 32
  • Thank you for reply. I have use this [https://api.whatsapp.com/send?31651566745] link but it display me "This link is incorrect. Close this window and try a different link." – Vimal Patel Apr 18 '17 at 07:52
  • try this ` https://api.whatsapp.com/send?phone=whatsappphonenumber&text=urlencodedtext` where whatsappphonenumber is a full phone number in international format and urlencodedtext is the URL-encoded pre-filled message. – Edison Augusthy Apr 18 '17 at 08:03
  • @VimalPatel .i have updated the answer just check this – Edison Augusthy Apr 18 '17 at 08:07
  • I have try [api.whatsapp.com/send/?phone=919558449166&text=hi] but it display me "The address wasn't understood: – Vimal Patel Apr 19 '17 at 09:59