API KIRIM SMS REGULER

Untuk mengirim SMS ke satu penerima.

Perintah:

https://reguler.zenziva.net/apps/smsapi.php?userkey=xxx&passkey=xxx&nohp=xxx&pesan=xxx

Contoh:

https://reguler.zenziva.net/apps/smsapi.php?userkey=xxxxxx&passkey=xxxxxx&nohp=081234567890&pesan= test kirim sms dengan zenziva api
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan

Respon dari perintah di atas dalam format XML.

Contoh respon:

<response>
<message>
<to>081234567890</to>
<status>0</status>
<text>Success</text>
</message>
</response>

Contoh script php:

$userkey = "xxxxxx"; //userkey lihat di zenziva
$passkey = "xxxxxx"; // set passkey di zenziva
$telepon = "081234567890";
$message = "Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com. Silahkan baca dan download petunjuk selanjutnya. Harap Maklum";
$url = "https://reguler.zenziva.net/apps/smsapi.php";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, 'userkey='.$userkey.'&passkey='.$passkey.'&nohp='.$telepon.'&pesan='.urlencode($message));
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$results = curl_exec($curlHandle);
curl_close($curlHandle);

$XMLdata = new SimpleXMLElement($results);
$status = $XMLdata->message[0]->text;
echo $status;

API KIRIM SMS MASKING

Untuk mengirim SMS ke satu penerima.

Perintah:

https://alpha.zenziva.net/apps/smsapi.php?userkey=xxx&passkey=xxx&nohp=xxx&pesan=xxx

Contoh:

https://alpha.zenziva.net/apps/smsapi.php?userkey=f4jknm&passkey=1234&nohp=081234567890&pesan=kirim sms dengan zenziva api
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan

Respon dari perintah di atas dalam format XML.

Contoh respon:

<response>
<message>
<messageId>0200000000694926</messageId>
<to>081234567890</to>
<status>0</status>
<text>Success</text>
</message>
</response>

Contoh script php:

$userkey = "xxxxxx"; //userkey lihat di zenziva
$passkey = "xxxxxx"; // set passkey di zenziva
$telepon = "081234567890";
$message = "Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com. Silahkan baca dan download petunjuk selanjutnya. Harap Maklum";
$url = "https://alpha.zenziva.net/apps/smsapi.php";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, 'userkey='.$userkey.'&passkey='.$passkey.'&nohp='.$telepon.'&pesan='.urlencode($message));
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$results = curl_exec($curlHandle);
curl_close($curlHandle);

$XMLdata = new SimpleXMLElement($results);
$status = $XMLdata->message[0]->text;
echo $status;

API KIRIM SMS CENTER V2.0

API KIRIM SMS V2.0 hanya untuk pelanggan SMS Center yang terdaftar mulai dari Januari 2018.

Perintah:

POST
http://SUBDOMAIN/api/sendsms/
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan

Respon dari perintah di atas dalam format JSON.

Contoh respon:

{
	"messageId":"157365",
	"to":"081111111111",
	"status":"1",
	"text":"Success"
}

Contoh script php:

$userkey = 'XXXXX';
$passkey = 'XXXXX';
$telepon = '081111111111';
$message = 'Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com';
$url = 'http://SUBDOMAIN_ANDA/api/sendsms/';
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, array(
    'userkey' => $userkey,
    'passkey' => $passkey,
    'nohp' => $telepon,
    'pesan' => $message
));
$results = json_decode(curl_exec($curlHandle), true);
curl_close($curlHandle);
echo $results ;

API KIRIM SMS CENTER V1.0

Perintah:

http://SUBDOMAIN/api/sendsms.php?userkey=xxx&passkey=xxx&nohp=xxx&tipe=xxx&pesan=xxx

Contoh:

http://demo.zenziva.com/api/sendsms.php?userkey=f4jknm&passkey=1234&nohp=081234567890&tipe=reguler&pesan=kirim sms dengan zenziva api
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
tipe reguler
pesan Isi pesan

Respon dari perintah di atas dalam format XML.

Contoh respon:

<response>
<message>
<messageId>0200000000694926</messageId>
<to>081234567890</to>
<status>0</status>
<text>Success</text>
</message>
</response>

Contoh script php:

$userkey = "xxxxxx"; //userkey lihat di zenziva
$passkey = "xxxxxx"; // set passkey di zenziva
$telepon = "081234567890";
$message = "Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com. Silahkan baca dan download petunjuk selanjutnya. Harap Maklum";
$url = "https://SUBDOMAIN_ANDA/api/sendsms.php";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, 'userkey='.$userkey.'&passkey='.$passkey.'&nohp='.$telepon.'&tipe=reguler&pesan='.urlencode($message));
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$results = curl_exec($curlHandle);
curl_close($curlHandle);

$XMLdata = new SimpleXMLElement($results);
$status = $XMLdata->message[0]->text;
echo $status;