![]() |
AT&T API Platform SDK for Microsoft®
2.3.3
Wrapper classes that allow developers to build robust applications using .NET
|
This cookbook shows you how to develop an In-application Messaging From Mobile Number Service application using the Platform SDK for Microsoft.
The Platform SDK for Microsoft provides the following methods:
To use these methods in an application, perform the following steps:
To send Short Message Service (SMS) or Multimedia Messaging Service (MMS) on behalf of subscribers, invoke the SendMessage method using the RequestFactory instance by passing the addresses, message content and attachments (attachments are optional) as parameters. The AT&T Platform will retrieve the MSISDN of the subscribers from the consent mechanism and then append it as the source address in the request. The recipients (maximum of ten) can be email address, short code or mobile numbers or combination of email address, short code or/and mobile numbers. Application will make a single API call and the AT&T Platform will figure out if the message is SMS or MMS based on the content and then select the correct transport mechanism accordingly.
string addresses = "xxxxxxxxx"; List<string> attachments = null; attachments.Add("xxxxxxxxxxx"); attachments.Add("xxxxxxxxxxx"); string message = "xxxxx xxxxx xxx xxxxxxxxxx"; SendMessageResponse response = this.requestFactory.SendMessage(addresses, attachments, message);
To request a block of subscriber message headers from the AT&T Platform, invoke the GetMessageHeaders method using the RequestFactory instance by passing a count and an optional index value for referencing the starting record of the query as shown in the following code example. The initial request must only contain the count parameter.
GetMessageHeadersResponse response = this.requestFactory.GetMessageHeaders(10);
To request message content from the AT&T Platform, invoke the GetMessage method using the RequestFactory instance by passing a content identifier and an associated message identifier. The GetMessage method uses the information returned by the GetMessageHeaders method to fetch one or more subscriber messages from the AT&T Platform.
GetMessageContentResponse response = this.requestFactory.GetMessage("S10","1");