GetIncomingMessagesAfterIdExtended
Get a list of incoming messages which arrived after the message with the given ID. Includes destination phone number.
// uses JQuery libraryvar postUrl = 'https://secure.smsgateway.ca/services/incoming.svc/' + accountKey + '/afterIdExtended/' + messageNumber;
$.ajax({ url: postUrl, method: 'GET', contentType: 'application/json;charset=UTF-8',}) .done(function (response) { alert(response); }) .error(function (xhr, textStatus, errorThrown) { alert(xhr.responseText); });<?php// using SOAP Module - http://ca3.php.net/soap
class SMSParam { public $AccountKey; public $MessageNumber;}
$client = new SoapClient('https://secure.smsgateway.ca/sendsms.asmx?WSDL');$parameters = new SMSParam;
$parameters -> AccountKey = accountKey;$parameters -> MessageNumber = 5;
$Result = $client->GetIncomingMessagesAfterIDExtended($parameters);?>' Service Reference (SOAP)Using client = New SwiftSMS.SendSMSSoapClient Dim response = client.GetIncomingMessagesAfterIDExtended(accountKey, messageNumber)End Using
' WebClient (REST)Dim url = String.Format("https://secure.smsgateway.ca/services/incoming.svc/{0}/afterIdExtended/{1}", accountKey, messageNumber)
Using wClient = New Net.WebClient wClient.Encoding = New UTF8Encoding() wClient.Headers.Add(HttpRequestHeader.ContentType, "application/json")
Dim wResponse = wClient.DownloadString(url)End Usingcurl "https://secure.smsgateway.ca/services/incoming.svc/[accountKey]/afterIdExtended/[messageNumber]"// Service Reference / SOAPusing (var client = new SwiftSMS.SendSMSSoapClient()){ var incomingMessages = client.GetIncomingMessagesAfterIDExtended(accountKey, messageNumber);
}
// Web Client / RESTvar url = string.Format("https://secure.smsgateway.ca/services/incoming.svc/{0}/afterIdExtended/{1}", accountKey, messageNumber);
using (var wClient = new System.Net.WebClient()){ wClient.Encoding = Encoding.UTF8; wClient.Headers.Add(HttpRequestHeader.ContentType, "application/json");
var response = wClient.DownloadString(url);}HTTP Request
GET:
/services/incoming.svc/:accountKey/afterIdExtended/:messageNumber| Parameter | Description | Location |
|---|---|---|
| AccountKey | Your Swift SMS Gateway account key | URL |
| MessageNumber | The ID of message to retrieve incoming messages after | URL |
Returns
Array of SMSIncomingMessageFull.