API KIRIM SMS REGULER

Untuk mengirim SMS ke satu penerima.

Perintah:

POST
https://gsm.zenziva.net/api/sendsms/
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan

Contoh respon dalam format JSON.

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

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://gsm.zenziva.net/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);

API KIRIM SMS MASKING

Untuk mengirim SMS ke satu penerima.

Perintah:

POST
https://masking.zenziva.net/api/sendsms/
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan (Maksimum 580 karakter)

Contoh respon dalam format JSON.

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

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://masking.zenziva.net/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);

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 PESAN WHATSAPP REGULER

Perintah:

POST
https://gsm.zenziva.net/api/sendWA/
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 = "xxxxxx";
$passkey = "xxxxxx";
$telepon = "6281234567890";
$message = "Hi, This is WhatsApp message.";
$url = "https://gsm.zenziva.net/api/sendWA/";
$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);

API KIRIM PESAN WHATSAPP CENTER

Perintah:

POST
http://SUBDOMAIN/api/WAsendMsg/
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
instance WhatsApp instance ID
nohp Nomor tujuan
pesan Isi pesan

Respon dari perintah di atas dalam format JSON.

Contoh respon:

{
  "msg-count":1,
  "msg":[
    {
      "messageId":"2349",
      "to":"+628123456789",
      "status":"1",
      "text":"Success"
    }
  ]
}

Contoh script php:

$userkey = "xxxxxx";
$passkey = "xxxxxx";
$instanceID = '12345';
$telepon = "6281234567890";
$message = "Hi, This is WhatsApp message.";
$url = "http://SUBDOMAIN_ANDA/api/WAsendMsg/";
$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,
    'instance' => $instanceID,
    'nohp' => $telepon,
    'pesan' => $message
));
$results = json_decode(curl_exec($curlHandle), true);
curl_close($curlHandle);