Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML link for add contact to whatsapp

Tags:

html

android

I need to put a deep link in my HTML for adding a contact to the Phone and then begin a new conversation in whatsapp.

I found this code

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

And this one:

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

I need to open a conversation with a specific contact even if I don't have the contact. My first question is, where can I get the username for whatsapp?

Having the abid I can try if it works but I dont know where to get that data.

Thanks a lot

like image 343
Javier Torron Diaz Avatar asked Dec 01 '22 00:12

Javier Torron Diaz


2 Answers

<a href="https://api.whatsapp.com/send?phone=NUMBER">Send Message</a>

Without "+" or "00" at the beginning, just start country code and the number. Example USA is +12025599025 then in the code given, replace NUMBER with 12025599025

like image 194
eddy Avatar answered Dec 02 '22 13:12

eddy


this was worked for me:

whatsapp://send?text=MESSAGE&phone=+NUMERO&abid=+NUMERO

Obviusly "+NUMERO" is the wsp number and "MESSAGE" the preloaded message put in inhref` attribute

like image 39
Malki Mohamed Avatar answered Dec 02 '22 14:12

Malki Mohamed