gabrieldwight / Whatsapp-Business-Cloud-Api-Net

This is C# wrapper of whatsapp business cloud api for .NET
MIT License
298 stars 119 forks source link

How to send text messages to groups #4

Closed hdwilliam closed 2 years ago

hdwilliam commented 2 years ago

Hello, thanks for your contribution, it has been very useful to me, although now I also need to send messages to whatsapp groups, you know how I could achieve it, the truth is that I have looked for documentation but I have not been able to find it

gabrieldwight commented 2 years ago

@hdwilliam Hi, currently WhatsApp Business Cloud API only supports the recipient type set to individual. Whatsapp Message Object Documentation If the recipient type is not set to individual it will throw this error: 131002 - Invalid recipient type from their end. The other alternative is if you are able to get the phone numbers from the group and store them in a collection. Then you can send messages to those phone numbers in a loop.