How to Send Message on Whatsapp using PHP
In this article, We will learn how to send message on whatsapp using php. RC PANEL WHATS API offers lots of features like Unlimited Message, Bulk Message, Access Chat, Access Group List, Unlimited Templates, Chat Bot etc. You can go to their official website https://whats-api.rcsoft.in/
Step 1: Create a Account on RC Panel, you need to create a account to send message.
Step 2: Connect Your Device to RC Panel
Step 3: Go to my app section and create app. Just Simple Put name and website link to proceed. Now you will get developer integration/API.
How to send text message on whatsapp using php
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://whats-api.rcsoft.in/api/create-message', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => array( 'appkey' => 'xxxxxxxxxxxxxxxx', 'authkey' => 'xxxxxxxxxxxxxxx', 'to' => 'RECEIVER_NUMBER', 'message' => 'Example message', 'sandbox' => 'false' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
How to send text message with file on whatsapp using php
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://whats-api.rcsoft.in/api/create-message', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => array( 'appkey' => 'xxxxxxxxxxxxxxxxxxxx', 'authkey' => 'xxxxxxxxxxxxxxxxxxx', 'to' => 'RECEIVER_NUMBER', 'message' => 'Example message', 'file' => 'https://www.africau.edu/images/default/sample.pdf', 'sandbox' => 'false' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
How to send Template Message on whatsapp using php
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://whats-api.rcsoft.in/api/create-message', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => array( 'appkey' => '12f2eeaa-829e-4816-9106-3483179b2d16', 'authkey' => 'Rp2cSMAnojZpmDqboV4eni2U0IW2FkVLCKawSSIKoeCcLm2hua', 'to' => 'RECEIVER_NUMBER', 'template_id' => 'TEMPLATE_ID', 'variables' => array( '{variableKey1}' => 'Jhone', '{variableKey2}' => 'replaceable value' ) ), )); $response = curl_exec($curl); curl_close($curl); echo $response;