How to post this Curl Api this is WhatsApp api

SendText is an API that allows you to send text messages to WhatsApp numbers.

Endpoint : https://sms.wab24.xyz/api/send-message
Method : POST
Download Example PHP : Download

Array Body

{
  "api_key" => "9f4ff928dd69d9c26c7a0c6b086618b63ffae3b4",
  "receiver" => "887xxxxxxxx",
  "data":{
    "message": "Hello World"
  }
}

Code Example Curl

curl -X POST \
'https://sms.wab24.xyz/api/send-message' \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--data-raw '{
  "api_key": "9f4ff928dd69d9c26c7a0c6b086618b63ffae3b4",
  "receiver": "628xxxxxxxx",
  "data":{
    "message": "Hello World"
  }
}

Code Example PHP

$body = array(
  "api_key" => "9f4ff928dd69d9c26c7a0c6b086618b63ffae3b4",
  "receiver" => "628xxxxxxxx",
  "data" => array("message" => "Hello World")
);

$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => "https://sms.wab24.xyz/api/send-message",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode($body),
  CURLOPT_HTTPHEADER => [
    "Accept: */*",
    "Content-Type: application/json",
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

i am using this code but its not working

test(1).aia (2.5 KB)

this methord is not working help me

Discuss Off Topic

Can you show the response content?

Use DO IT in the JOIN BLOCK and then compare text with the code to find error.

@cybarzone_3 i had solved the issues and it took me more than hour,
you can test the apk i provided below:
test 2.apk (5.2 MB)
Just paste your valid API KEY in the API key text box and try to send and it will send the message.
Below i have cleared all block level issues and it works fine by just giving the (INVALID API KEY) error.

Please verify whether it works or not and reply here :heart::+1:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.