Emmanuel John
Emmanuel John

Reputation: 1

Sending a whatsapp message using click to chat

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

Upvotes: 0

Views: 8075

Answers (2)

ahmed_soft3
ahmed_soft3

Reputation: 1

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");

Upvotes: 0

Ranjit Singh
Ranjit Singh

Reputation: 21

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');

}

Upvotes: 2

Related Questions