Empowering Minds with Tech Knowledge.

How to send message using WhatsApp API?

How to send message using WhatsApp API?

03/February/2025 19:43    Comments (0)     Share:        Bookmark

You can use the below PHP code to send a message using our Whatsapp API.  

$apikey="Enter your API key here";
$mobile="Enter 10 digit mobile number here";
$msg=urlencode("Enter your message here");
$image=urlencode("Enter full Image URL here with https:// or leave blank");
$pdf=urlencode("Enter full PDF URL here with https:// or leave blank");

$arrContextOptions=array(
    "ssl"=>array(
        "verify_peer"=>false,
        "verify_peer_name"=>false,
    ),
);

$wap_url="https://wap.xhost.co.in/wapp/api/send?apikey=$apikey&mobile=$mobile&msg=$msg&img1=$image&pdf=$pdf";
$response = file_get_contents($wap_url, false, stream_context_create($arrContextOptions));



Comments (0)
Leave a Reply

Your email address and mobile will not be published.

Trending Blog
Related Blog

17/October/2024 16:16 Comments (0)
How to replace Fast2SMS?
22/February/2025 16:38 Comments (0)
How to setup OTP SMS API in your code?

Subscribe our Newsletter