Skip to content

GetIncomingMessagesByReferenceAfterId

Get a list of incoming messages with the given Reference which arrived after the message with the given ID.

// uses JQuery library
var postUrl =
'https://secure.smsgateway.ca/services/incoming.svc/' +
accountKey +
'/reference/' +
reference +
'/afterId/' +
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);
});

HTTP Request

GET:

/services/incoming.svc/:accountKey/reference/:reference/afterId/:messageNumber
ParameterDescriptionLocation
AccountKeyYour Swift SMS Gateway account keyURL
ReferenceThe reference of sent messages to retrieve replies toURL
MessageNumberRetrieve incoming messages after this IDURL

Returns

Array of SMSIncomingMessage.