SMS API Scenario Guide

This document contains scenario and reference information that you can use when preparing to use the API with SMS messages. Code samples in this document are .NET 2.0 (C#). For more code samples, visit the ExactTarget Developer Community.

This document is intended for developers using the ExactTarget Web Service API to enable SMS messages.

SMS Messages

This document discusses API calls you can use with SMS messages. SMS messages can be created and sent from within the application. See SMS Messages for more information.

Tools and Prerequisites

Before you can use the ExactTarget API with SMS messages, you must have the following:

  • A private short code or a shared short code. 
  • The SMS feature enabled on your account. Contact your account manager or customer support for more information.
  • The WSDL (Web Service Description Language) file that resides in this location:
    https://webservice.exacttarget.com/etframework.wsdl

Scenarios

The following scenarios cover the most common business processes around triggering SMS messages with code samples.

Single-Send SMS

You use the following code to send an SMS message to a single subscriber, as a response to an MO message or other triggering event.

Web Service API Example

// ************** Single SEND (SMS)************** 
//1. Create SMS triggered send object
ts = new SMSTriggeredSend();

//2. Set up the triggered send definition
ts.SMSTriggeredSendDefinition = new SMSTriggeredSendDefinition();
ts.SMSTriggeredSendDefinition.CustomerKey = "YourSMSSendID";

//3. Set up the subscriber
ts.Subscriber = new Subscriber();
ts.Subscriber.SubscriberKey = "YourSubscriberID";
ts.Number = "18125556911";
ts.Message = "Hello phone";

//4.  Invoke the Web Service 
results = partnerAPI.Create(new CreateOptions(), new APIObject[] { ts }, out requestID, out status);

 
List-Send SMS

You use the following code to send an SMS message to a list, as an MT message.

Web Service API Example

// ************** List SEND (SMS) ************** 
//1. Create SMS triggered send object
ts = new SMSTriggeredSend();

//2. Set up the triggered send definition
ts.SMSTriggeredSendDefinition = new SMSTriggeredSendDefinition();
ts.SMSTriggeredSendDefinition.CustomerKey = "YourSMSSendID"; 

ts.Message = "Hello phone"; //optional

//3.  Invoke the Web Service 
results = partnerAPI.Create(new CreateOptions(), new APIObject[] { ts }, out requestID, out status);

 


Enter the digits 23030 backwards:
   
 

 

 

Tag page
You must login to post a comment.