This PHP script allows you to send a WhatsApp message to multiple recipients using the NeuAPIX API. It makes an API request for each recipient with a configurable sleep duration between the requests. The script can be used as a webhook to automatically send messages when an event occurs. 🚀
- PHP 7.0 or higher
- A registered business phone number, channel ID, and API token from NeuAPIX
- Clone or download this repository.
- Open
whatsapp_multi_recipient_sender.php
in your favorite text editor. - Edit the
$recipients
array and add the phone numbers you want to send messages to. - Replace the
$authHeader
variable value with your NeuAPIX API token. - (Optional) Adjust the
$sleepDuration
variable value to set the sleep duration between API requests (in seconds). - Update the API URL with your correct channel ID.
Run the script using the PHP command line interface, or use it as a webhook in your application: