This library for easy to use in PHP with composer installation. Please referer to our REST API Documentation if you want to build in you're own programing langguage.
composer require premiumfastnet/wsgateway
You can check on folder example for easy to use. keep in mind, you need change config.php.example to config.php and fill variable on that files to work or you can make you're own combination.
- Request
<?php
require "vendor/autoload.php";
use PremiumFastNetwork\WSGateway;
$wa = new WSGateway();
$wa->token('YOUR-TOKEN-HERE');
$wa->deviceid('YOUR-DEVICE-ID');
$send = $wa->sendmessage('0812xxxxxxxx', 'test send message by api');
var_dump(json_decode($send));- Response
class stdClass#29 (2) {
public $code =>
int(200)
public $message =>
string(44) "success, message will be send in background."
}
- Request
<?php
require "vendor/autoload.php";
use PremiumFastNetwork\WSGateway;
$wa = new WSGateway();
$wa->token('YOUR-TOKEN-HERE');
$wa->deviceid('YOUR-DEVICE-ID');
$multiplenumber = array(
'08xxxx', '08xxxxx'
);
$send = $wa->sendmessage($multiplenumber, 'test send message by api');
var_dump(json_decode($send));- Response
class stdClass#29 (2) {
public $code =>
int(200)
public $message =>
string(37) "success, all message in waiting list."
}
- Request
<?php
require "vendor/autoload.php";
use PremiumFastNetwork\WSGateway;
$wa = new WSGateway();
$wa->token('YOUR-TOKEN-HERE');
$wa->deviceid('YOUR-DEVICE-ID');
$send = $wa->sendgroup('xxxxx', 'test send message by api');
var_dump(json_decode($send));- Response
class stdClass#29 (2) {
public $code =>
int(200)
public $message =>
string(37) "success, all message in waiting list."
}