Web Service - Methods - GetSMSReply
GetSMSReply
This method is used to retrieve messages sent as replies to messages previously sent using the SendSMS method, where the ReplyMethodID was set to 3.
Any text message replies associated with the given clientMessageReference parameter will be returned. If the clientMessageReference is left intentionally blank, all available reply messages will be returned.
You can choose to receive the return code data from this method as either a CSV string or XML through your setting of the returnCSVString parameter.
If a CSV string is requested, the first line will contain the Transaction code contained within the '#' characters.
The setting of the clientMessageReference parameter will have the same value as previously given when invoking the SendSMS method unless left intentionally blank to receive all waiting replies.
On successful completion of this method, any new text message replies are returned.
For each new reply message, the following fields are returned:
ClientMessageReference |
the value of the given clientMessageReference |
Originator |
the sender of the message |
Destination |
the number to which the reply was sent |
Date |
the date that the message was received |
Time |
the time that the message was received |
Body |
the content of the message |
OriginalBody |
the body of the original outgoing message |
Return Data
XML:
<GetSMSReplyResponse>
<Transaction>
<Code>1</Code>
<Description>Transaction OK</Description>
</Transaction>
<Replies>
<Reply>
<ID>1</ID>
<ClientMessageReference>afk758</ClientMessageReference>
<Originator>+447980123456</Originator>
<Destination>+447781484145</Destination>
<Date>2009-06-13</Date>
<Time>17:05:41</Time>
<Body>hello world</Body>
<OriginalBody>Please reply to this SMS</OriginalBody>
</Reply>
<Reply>
<ID>2</ID>
<ClientMessageReference>afk759</ClientMessageReference>
<Originator>+447980123456</Originator>
<Destination>+447781484146</Destination>
<Date>2009-06-13</Date>
<Time>17:06:37</Time>
<Body>Hello world</Body>
<OriginalBody>Please reply to this SMS</OriginalBody>
</Reply>
</Replies>
</GetSMSReplyResponse>
CSV:
#1# "1","+447980123456","+447781484145","afk758","hello world","Please reply to this SMS","2009-06-13","17:05:41"
"2","+447980123456","+447781484146","afk759","Hello world","Please reply to this SMS","2009-06-13","17:06:37"