SMS Message Response Postback

From CDYNE Wiki
Jump to navigation Jump to search

SMS Response POST

If you assign a PostbackURL to your account DIDs, the PostBack will allow you to capture the data in the fields listed below. Please note that data is posted to the headers.

PostBackURL data is posted behind the scenes, and is not visible on your webpage. Code samples are provided below on how to grab this data to store in a database. CDYNE recommends that the data returned to be stored within your systems for reporting and reference information.

Fields

SMSResponse

Always set to "1." SMSResponse=1 is posted when a response to an outgoing message arrives.

MessageID

A unique identifier for this response. This will come as a GUID.

MatchedMessageID

A GUID that is populated when the response matches a previous message.

ReferenceID

This is populated if the response matches a previous message and you set the ReferenceID field in your outgoing SMS.

FromPhoneNumber

This is the number that sent the response text message.

ToPhoneNumber

This will be your assigned DID that the response text message was sent to.

ResponseReceiveDate

UTC Date when the message came in . Usually within a few seconds of the current time.

Message

This is the response SMS text message body.

Example Packet

POST /cdynepostback.aspx HTTP/1.1
User-Agent: CDYNE SMSv2
Content-Type: application/x-www-form-urlencoded
Host: cdyne.com
Content-Length: 242
Expect: 100-continue
Connection: Keep-Alive

SMSResponse=1&MessageID=9a35e913-ded0-7574-4642-5f60c550c706&MatchedMessageID=11111111-2222-1111-2222-000000000004&ReferenceID=&FromPhoneNumber=17575449510&ToPhoneNumber=17575449511&ResponseReceiveDate=5%2f8%2f2010+2%3a42%3a36+AM&Message=Test