Account Event Handler
Use the Options page within Messenger to specify a web page to call when an event occurs on your account. The fields Esendex will post to your page are shown below.
| Authentication | ||
| username | The username you entered into the Account Options page. | |
| password | The password you entered into the Account Options page. | |
| account | The reference of the account the notification is for. | |
| Notification type | ||
| notificationType | The type of notification. This can be: MessageReceived MessageEvent MessageError SubscriptionEvent Use the sections below to see the fields that will be set when for each kind of notification. |
|
| MessageReceived details | ||
| id | The ID assigned to the message by Esendex. | |
| originator | The mobile number of the message sender. | |
| recipient | Your virtual mobile number. | |
| body | The content of the message. | |
| type | The type of message (Text, Binary, SmartMessage, Unicode). | |
| receivedAt | The date and time at which Esendex took delivery of the message. | |
| MessageEvent details | ||
| id | The ID assigned to the message by Esendex. | |
| eventType | The type of event that occurred. Currently, the only value is Delivered, but this may be extended in future releases. | |
| occurredAt | The time the event occurred. | |
| MessageError details | ||
| id | The ID assigned to the message by Esendex. | |
| errorType | The type of error that occurred. This can be Failed, UnrecognisedRecipient or ValidityPeriodExpired. | |
| occurredAt | The time the event occurred. | |
| detail | A description of the error. | |
| SubscriptionEvent details | ||
| mobileNumber | The mobile number of the subscriber. | |
| contactID | The ID of the contact if you have selected Auto Add Contacts in your Account Options. | |
| eventType | The type of the subscription event. This can be either Subscribe, Unsubscribe, Resubscribe, or Continue | |
| occurredAt | The date and time the event occurred. | |
Click here to see a sample ASP page that could be used as an AccountEventHandler.
Click here to see a form that mimics the way Esendex calls an AccountEventHandler page.