This is esmsapi.com Api they just give us in PHP and python but we can't understand how we can convert it to traccar format I have tested it with PHP it working fine
<?php
$message = [
"secret" => "2132819115a436ba940ac088e4d13df525e813e4",
"mode" => "devices",
"device" => "00000000-0000-0000-564a-9da69378e695",
"sim" => 1,
"priority" => 2,
"phone" => "+923167290099",
"message" => "Hello World!"
];
$cURL = curl_init("https://esmsapi.com/api/send/sms");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_POSTFIELDS, $message);
$response = curl_exec($cURL);
curl_close($cURL);
$result = json_decode($response, true);
print_r($result);
Something like this should work:
<entry key='notificator.types'>web,mail,sms</entry>
<entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
<entry key='sms.http.url'>https://esmsapi.com/api/send/sms</entry>
<entry key='sms.http.template'>
secret=YOUR_KEY&mode=devices&device=DEVICE_ID&sim=1&priority=2&phone={phone}&message={message}
</entry>
wow...! it's working fine...! now I will connect multiple android mobiles with traccar Thanks for your great support
This is esmsapi.com Api they just give us in PHP and python but we can't understand how we can convert it to traccar format I have tested it with PHP it working fine
<?php $message = [ "secret" => "2132819115a436ba940ac088e4d13df525e813e4", // your API secret from (Tools -> API Keys) page "mode" => "devices", "device" => "00000000-0000-0000-564a-9da69378e695", "sim" => 1, "priority" => 2, "phone" => "+923167290099", "message" => "Hello World!" ]; $cURL = curl_init("https://esmsapi.com/api/send/sms"); curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true); curl_setopt($cURL, CURLOPT_POSTFIELDS, $message); $response = curl_exec($cURL); curl_close($cURL); $result = json_decode($response, true); // do something with the response print_r($result);