Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Method parameters

This method was created as an alternative to the SendSingleSMS method with the option type=TEXT, as SendSingleSMS creates a new message for each call and allocates it in the database . An (an intensive usage leads of SendSingleSMS leads to a database overload).

Use SendDirectSMS when you have to send thousands of text messages each day and you need a deep customization of each message (i.e. placeholders of personal data fields are not enough for your needs).

  • string SendDirectSMS(string accessKey, int listID, string subject, string type, string content, string numero, Option[] options)
    • accessKey: access key obtained using the LoginLoginFromId method
    • listID: list identifier. Lists and corresponding IDs can be obtained calling the GetLists Methodsubject: subject of the text message
    • content: message text sourcetype = ID, content is the identifier of the text message to be sent
    • numero: recipient's number. Use international prefix (either with 00 or +), otherwise default list prefix will be applied
    • options: an array of key/value pairs for options setting.  A subset of Only the options listed for the WS_MailUpSend.CreateSMS method and WS_MailUpSend.SendSMS method are following options are available for this method as well.
    • note: a string containing notes about the message
    • dyn_fld: boolean value to enable/disable the use of dynamic fields in the message (dyn_fld=true, dyn_fld=false)
      • from: sender of the text messagetrack_delivery: boolean value indicating whether the sending will appear in the delivery report or notmessage (note: restrictions may apply in some countries and the sender may be overwritten, please contact us for country specific information)
      • isUnicode: boolean value indicating whether to use Western alphabets only (0 means "false"), or Eastern alphabets as well, such as Arabic, Russian, Chinese, and so on (1 means "true").

...

      • MessageId: the ID of the message used to store statistical data

Note

Statistical data about this message will be stored in the message "Default N"

...

(where "N" indicates the list identifier) or in the message identified by MessageId if declared in the Options.

 

If error code=0, the call to the method was successful and the method returns the details of the sending

...

SOAP Examples

Code Block
languagehtml/xml
titleSendDirectSMS SOAP request
firstline1
linenumberstrue
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://services.mailupnet.it/WS">
   <soap:Header/>
   <soap:Body>
      <ws:SendDirectSMS>
         <!--Use accessKey <ws:accessKey> accessKey<value that is returned by LoginFromId method-->
         <ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9</ws:accessKey>
         <ws:listID>1</ws:listID>
         <ws:content>this is message text</ws:content>
         <!-- "numero" is recipient's number. Use international prefix (either with 00 or +), otherwise default list prefix will be applied -->
         <ws:numero>+393351234567<18889624587</ws:numero>
         <ws:options>
                <!-- Sender can be a number (with international prefix) or a string (up to 11 characters) -->
                <ws:Option><ws:Key>from</ws:Key><ws:Value>mittente</ws:Value></ws:Option>
                <!-- Unicode messages have a lenghtlength of 70 chars instead of 160. -->
                <!--Concatenation of text messages exceeding lenghtlength specified above is automatically either for Unicode or not Unicode messages-->
                <!-- (up to 3 messages can be concatenated) -->
                <ws:Option><ws:Key>isUnicode</ws:Key><ws:Value>false</ws:Value></ws:Option>
         </ws:options>
      </ws:SendDirectSMS>
   </soap:Body>
</soap:Envelope>

 

Sample SendDirectSMS response

...

Code Block
languagehtml/xml
titleSOAP response
firstline1
linenumberstrue
<SendDirectSMSResult>

  <errorCode>0</errorCode>

  <errorDescription>Message sent +18889624587</errorDescription>

</SendDirectSMSResult>