SendBulkMessageWithOptions
Sends an SMS message to all the cell numbers provided (maximum of 5000). Returns the number of messages successfully queued, or an error message on failure.
// uses JQuery library/** NOT CURRENTLY AVAILABLE **/<?php// using SOAP Module - http://ca3.php.net/soap
class SMSParam { public $AccountKey; public $MessageBody; public $Reference; public $CellNumbers; public $Options;}
$client = new SoapClient('https://secure.smsgateway.ca/sendsms.asmx?WSDL');$parameters = new SMSParam;
$parameters -> AccountKey = accountKey;$parameters -> MessageBody = "This is a demonstration of SMSGateway.ca using PHP5.";$parameters -> Reference = reference;$parameters -> CellNumber = (destinationNumber, destinationNumber, ...);$parameters -> Options = ("MsgContentType=Unicode", "SenderId=" + sendingNumber);
$Result = $client->SendBulkMessageWithOptions($parameters);?>Dim numbers = New ArrayOfString()numbers.Add(destinationNumber)
Dim options = new ArrayOfString()options.Add("MsgContentType=ASCII")options.Add("SenderId=" & sendingNumber)
' Service Reference (SOAP)Using client = New SwiftSMS.SendSMSSoapClient Dim response = client.SendBulkMessage(accountKey, messageBody, reference, numbers, options)End Using
' WebClient (REST)'** NOT CURRENTLY AVAILABLE **HTTP POST:# NOT CURRENTLY AVAILABLE #// Create an "ArrayOfString" object with the numbers to receive the SMS messagevar numbers = new SwiftSMS.ArrayOfString { destinationNumber };var options = new SwiftSMS.ArrayOfString { "MsgContentType=Unicode", "SenderId=" + sendingNumber }
// Service Reference / SOAPusing (var client = new SwiftSMS.SendSMSSoapClient()){ var response = client.SendBulkMessageWithOptions(accountKey, messageBody, reference, numbers, options);}// Web Client / REST/** NOT CURRENTLY AVAILABLE **/HTTP Request
| Parameter | Description | Location |
|---|---|---|
| AccountKey | Your Swift SMS Gateway account key | URL |
| MessageBody | Body of the message to send | BODY |
| Reference | Internal Reference ID | BODY |
| CellNumbers | Array of cell numbers to deliver SMS messages to | BODY |
| Options | Array of strings with each containing [key]=[value] | BODY |
Options
| Parameter | Value | Description | Is Default |
|---|---|---|---|
| MsgContentType | Send message as ASCII or Unicode | ||
| Unicode | Send Unicode Message (allowing the extended character set) | ||
| ASCII | Send messages using only ASCII characters | Yes | |
| SenderId | Phone number of dedicated long code to send your messages from | ||
| Reference2 | Secondary Reference field. | ||
If this is an email address, any replies will be send to this address. This OVERRIDES account settings. |
Returns
string
If successful, will return x messages queued successfully
If unsuccessful, will return an error message: (See (SendMessage))