string loginEmail = "Spread@reasonables.com";
string APIKey = "TEST0000-TEST-0000-TEST-0000TEST0000";
string SMScontent = "Test";
string senderNumber = "85212345678";
string[] phoneSubscribers = {"85265206520", "85265216521"};
string[] categorys = {"myTestList1", "myTestList2", "myTestList3"};
SpreadAPI.SpreadWebService MySpread = new SpreadAPI.SpreadWebService();
int smsCampaignID = MySpread.SendSMS(loginEmail, APIKey, SMScontent, senderNumber, DateTime.Now, SpreadAPI.CampaignStatus.Waiting, phoneSubscribers, categorys);
Dim MySpread As New SpreadWS.SpreadWebService()
Dim loginEmail As String = "Spread@reasonables.com"
Dim APIKey As String = "TEST0000-TEST-0000-TEST-0000TEST0000"
Dim SMScontent As String = "Test"
Dim senderNumber As String = "85212345678"
Dim phoneSubscribers() As String = {"85265206520", "85265216521"}
Dim categorys() As String = {"myTestList1", "myTestList2", "myTestList3"}
Dim smsCampaignID As Integer = MySpread.SendSMS(loginEmail, APIKey, SMScontent, senderNumber, Now, SpreadWS.CampaignStatus.Waiting, phoneSubscribers, categorys)
//using curl
//sudo apt-get install php-curl or sudo apt-get install php5-curl
//extract data from the post
//set POST variables
$url = 'http://service1.rspread.com/service.asmx/SendSMS';
//$schedule = time();
$phoneSubscribers = array('8613800138000'); //array of string
$category = array();
$fields = array(
'loginEmail' => urlencode('spread@reasonables.com'),
'APIKey' => urlencode('****API KEY****'),
'SMSContent' => urlencode('Download NoClone 4 at http://noclone.net now!'),
'sender' => urlencode('Hiruscar'), // if you dont have sender id please set to 'sender' => urlencode(''),
'schedule' => urlencode("2022-12-20T14:50:50"),
//'schedule' => $schedule,
'campaignStatus' => urlencode('4'), // waiting and will send at schedule
'phoneSubscribers' => urldecode(http_build_query($phoneSubscribers));
//'category' => $category,
'category' => urldecode(http_build_query($category));
);
$fields_string='';
//url-ify the data for the POST
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
//using soapclient
echo'begin';
function SendSMS() {
$loginEmail = "spread@reasonables.com";
$APIKey = '****';
$category = array(); # ContactList can be null
$phoneSubscribers = array('13800138000'); #must be a arry of string, not a string
$SMSContent = "Download NoClone at http://noclone.net now!!";
$sender = ''; //$sender = 'AcnePro'; if you don't have senderid please set to null ,else set your sender
$schedule = time();
$campaignStatus ='Waiting';
$paraArray = array(
'loginEmail' => $loginEmail,
'APIKey' => $APIKey,
'SMSContent' => $SMSContent,
'sender' => $sender,
'schedule' => $schedule,
'campaignStatus' => $campaignStatus,
'phoneSubscribers' => $phoneSubscribers,
'category' => $category
);
$Client = new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
$cpnId = $Client -> SendSMS( $paraArray );
echo serialize($cpnId);
}
echo SendSMS();
POST {{YOUR_API_URL}}/service.asmx
Content-Type: application/soap+xml; charset=utf-8
Content-Length: {{length}}
<!-- Send Transactional SMS HTTP Body -->
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SendSMS xmlns="http://service.reasonablespread.com/">
<loginEmail>Spread@reasonables.com</loginEmail>
<APIKey>TEST0000-TEST-0000-TEST-0000TEST0000</APIKey>
<SMSContent>Test</SMSContent>
<sender></sender>
<schedule>2022-12-20T14:50:50</schedule>
<campaignStatus>Waiting</campaignStatus>
<phoneSubscribers>
<string>85212345678</string>
<string>85212345679</string>
</phoneSubscribers>
<category></category>
</SendSMS>
</soap12:Body>
</soap12:Envelope>
<!-- Send Promotional SMS HTTP Body -->
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SendSMS xmlns="http://service.reasonablespread.com/">
<loginEmail>Spread@reasonables.com</loginEmail>
<APIKey>TEST0000-TEST-0000-TEST-0000TEST0000</APIKey>
<SMSContent>Test</SMSContent>
<sender></sender>
<schedule>2022-12-20T14:50:50</schedule>
<campaignStatus>Waiting</campaignStatus>
<phoneSubscribers></phoneSubscribers>
<category>
<string>subscriptionName</string>
<string>contactListName</string>
</category>
</SendSMS>
</soap12:Body>
</soap12:Envelope>