Open Whatsapp on a specific contact through a web link [closed]

closed. this question is out of scope and is not currently accepting answers.

want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 12 months ago .

improve this question

I'm doing some tests where through a link when clicked, open whatsapp already in a specific contact.

What's the scenario? The customer who enters the site by smartphone will appear an icon and when you click on the icon, opens whatsapp to the customer already on the screen for him to chat with us.

After some research I found this example: <a href="intent://send/abid=NUMERO_TELEFONE#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">LINK</a>

On Android even opens whatsapp on the screen to chat, but if before there has been a conversation and it is saved.

If a contact has not existed before, it shows a message saying that " I'm probably trying to send a message to a contact that does not have whatsapp installed and gives the suggestion to invite to use".

That is, it only works if there has been a conversation previously. so I need to know a way to call a specific contact even without having the need for a prior conversation.

I am grateful to anyone who can help. Strong hug

 3
Author: Eduardo Martins, 2016-07-15

1 answers

You need to use https://api.whatsapp.com/send?phone=seu-numero&text=mensagem-inicial This will work even without prior contact, for both android and ios If your site is in wordpress the plugin WhatsApp Chat does it for you automatically, just put the number and message you want.

For web and desktop, just change the url's api to'web'

 3
Author: Alexandre Caporal, 2017-05-29 03:44:29