get_sms_messages

The get_sms_messages method returns a list of messages for a requested SMS line. 


Parameter
Purpose
usernameThe user's login name.
passwordThe user's login password.
sms_linetelephone line used for SMS sessions.
startSpecified Unix Time starting point (or blank to get all messages).
directionThe direction traveled by the messages. Possible values: "in" and "out". Blank signifies both directions.



Sample Request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:TelebroadWebServices">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:get_sms_messages soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <username xsi:type="xsd:string">usernamehere</username>
         <password xsi:type="xsd:string">passwordhere</password>
         <start xsi:type="xsd:int">1390262400</start>
     <direction xsi:type="xsd:int">out</direction>
      </urn:get_sms_messages>
   </soapenv:Body>
</soapenv:Envelope>



Sample Response
<item xsi:type="tns:sms_item">
               <id xsi:type="xsd:int">29716</id>
               <direction xsi:type="xsd:string">in</direction>
               <sender xsi:type="xsd:string">13474530363</sender>
               <receiver xsi:type="xsd:string">13474367373</receiver>
               <time xsi:type="xsd:string">1390262400</time>
               <msgdata xsi:type="xsd:string">Test</msgdata>
</item>



Error Handling


If you try to use get_sms_messages for an SMS line not currently owned by your user, you’ll get following error:
<faultcode xsi:type="xsd:string">api:get_sms_messages</faultcode>
<faultstring xsi:type="xsd:string">_invalid_sms_line_</faultstring>

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.