How to send message on WhatsApp Group using official API

三世轮回 提交于 2019-12-18 16:58:39

问题


I know about send message to any number using WhatsApp official API using

https://api.whatsapp.com/send?phone=

But is there any way to send message to WhatsApp Group is user is joined that group. I have a form and want this form data to be shared in our whatsapp group on click.


回答1:


The WhatsApp Business API Client supports a subset of the features provided by the WhatsApp applications you already know from Android, iOS, Web and other platforms including end-to-end encryption. The difference is that this application can be deployed on a server, providing a local API that allows you to programmatically send and receive messages and integrate this workflow with your own systems (CRMs, customer care, etc.).

So in Business API its possible to send messages to the group also. You can check here. The following are the sample command for sending group message :

POST /v1/messages   
{
    "preview_url": false | true,
    "recipient_type": "group",
    "to": "whatsapp-group-id",
    "render_mentions": true | false,
    "type": "text",
    "text": {
        "body": "your-text-message-content"
    }
}



回答2:


Currently, this is not possible with WhatsApp. Other messenger have an open API (e.g. Facebook messenger) which allow such features. See here.



来源:https://stackoverflow.com/questions/50189793/how-to-send-message-on-whatsapp-group-using-official-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!