Click or drag to resize
Wap Push Messaging

The SMS API can also be used to send wap push messages to mobile destinations. Wap push messages are those messages sent to mobile destinations which direct recipients to a specific Web URL. They are handy when there is the need to direct recipients to Web pages without requiring the recipients to manually enter any web addresses.

Sending wap push messages with the .NET SMS API is easy and very much like the previous discussions. The only difference is that the type of message to be sent must be WAP_PUSH from the MSGTYPE enumeration.

As has been done in the previous discussions, an object of type ZenophSMS must be initialised for authentication and submission of message.

// Initialise sms object
ZenophSMS sms = new ZenophSMS();

On successful authentication, the message parameters can be set. To send wap push message, the type of message to be sent must be set to WAP_PUSH from the MSGTYPE enumeration and also set the Web URL that the recipient will be directed to.

// set the message 
sms.setMessage("Hi Daniel, visit the accompanying URL to send bulk messages to Ghana.");

// the recipients can be added.
sms.addRecipient("0583456723", true);
sms.addRecipient("233563213864", true);
sms.addRecipient("+233295435867", true);
sms.addRecipient("00233507345768", true);

// the key to sending wap push messages are the following.

// the message can now be submitted.

When the message type is set to WAP_PUSH and the Web URL set, and we do not want to send the wap push message anymore, the message type can be changed to any other type. Once this is done, the Web URL that was set will be ignored and the message will not be sent as a wap push message.