0

Is it possible to send a WhatsApp message using the click to chat technique without clicking on sent the "send" button?

Here is the link https://wa.me/phonenumber?text=testing or https://api.whatsapp.com/send?phone=phonenumber&text=testing or whatsapp://send?phone=phonenumber&text=testing

Suppose I have a desktop app that open HTTP URLs to upload or download data from web server. Can I open the above URLs say https://wa.me/phonenumber?text=testing probably with extra url parameters to send a whatsapp message directly? Because this won't open the url on a browser to give you those controls for sending a whatsapp message over web.Here is the page that you get redirected to

2 Answers2

2

use below link (only for mobile) whatsapp://send?text=your_message&phone=123456789

For desktop you can use https://web.whatsapp.com/send?text=your_message&phone=123456789

you can also use javascript to check whether mobile or desktop

var ua = navigator.userAgent.toLowerCase();

var isMobile = ua.indexOf("mobile") > -1;

if (isMobile) {

    window.location.href = "whatsapp://send?text=your_message&phone=123456789;

} else {

    window.open("https://web.whatsapp.com/send?text=your_message&phone=123456789", "Share with Whatsapp Web", 'width=800,height=600');

}
  • You are repeating what I had mentioned in the post. I needed to post directly without the user's input/interaction. I already knew that by then! Like the way you send SMS using SMS Manager in android or make a call using Telephone package; not using intents! – Emmanuel John Nov 24 '20 at 07:12
0

you can use the parameter below to open in silent mode app_absent=1

            chromiumWebBrowser1.LoadUrl("https://web.whatsapp.com/send/?phone="+textBox1.Text +"&text=Welcome&app_absent=1");
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 15 '22 at 23:53