0

Is there any way to send message to group using HTMl or JS

<a href="whatsapp://send?abid=username&text=HeyThere!">whatsapp</a>

I tried doing with this but it didn't work.

Sujith Reddy
  • 11
  • 1
  • 6
  • 2
    Possible duplicate of [How to send message on WhatsApp Group using official API](https://stackoverflow.com/questions/50189793/how-to-send-message-on-whatsapp-group-using-official-api) –  Oct 03 '18 at 09:13
  • Which means that you've not tried searching through Stack Overflow first. –  Oct 03 '18 at 09:14
  • In that above link there is no answer they just say we cant. But there are lot of chat bots outside that are used to send message to groups and in person , So I asked Is there any way to automate messages to groups. – Sujith Reddy Oct 03 '18 at 09:39

2 Answers2

0

I think there is only option to contact single person through this format:

<a href="https://api.whatsapp.com/send?phone=WhatsAppPhoneNumber&text=urlencodedtext"></a>
Milanche
  • 1
  • 1
0

WhatsApp for obvious reasons does not allow you to automatically send a whatsapp message. What you can do is use a https://wa.me link to start the whatsapp application with share message dialog where your user can select who to share the message with:

<a href="https://wa.me/?text=Your%20Text%20Here">whatsapp</a>

It will open a share dialog like this (disregard the red box, I took the image from Google to demonstrate).

Also when you click this link, it will try to open the mobile app first. But if your user is on a desktop, it will try to open the Whatsapp Web interface.

enter image description here

nbokmans
  • 5,492
  • 4
  • 35
  • 59