msg logo
php icon

how to send whatsApp messages using api PHP

send whatsapp messages easily using api and start in minutes.

Full code
<?php $data = [ 'to' => ['+1234567890', '+0987654321'], 'message' => 'Hello from MSG!', // 'token' => 'YOUR_API_TOKEN' // Optional, gives full access ]; $ch = curl_init('https://api.sendmsg.dev/message/batch'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($data) ]); $response = curl_exec($ch); $result = json_decode($response, true); curl_close($ch);
Other available languages