How To Retrieve Two-Way SMS Messages From Clickatell Gateway

Written on October 9, 2007 – 9:29 pm | by Michael Boateng |

In an earlier post, I wrote about what a two-way (2-way) or bidirectional messaging is and the sms messaging provider to consider if you are considering building a 2-way sms application.

This tutorial shows you how to retrieve your two-way messages from Clickatell’s Gateway using their HTTP/S Protocol. It is fairly simple and almost the same as using a Callback URL to retrieve SMS Message response from Clickatell gateway.

Before using this tutorial, make sure two things are done

1. REQUEST for your Clickatell two-way number.
2. Set the callback URL at your control panel on Clickatell’s website. eg. (www.mboateng.com/2way/callback.php)

Once these two things have been done, you will need to create a mysql table which will store data sent to your web server by Clickatell’s Gateway API. Below is the mysql script.

Mysql Table (tbl_messages)

CREATE TABLE ‘tbl_messages’ (
‘msgid’ int(10) NOT NULL auto_increment,
’sender’ varchar(50) default NULL,
‘recipient’ varchar(50) default NULL,
‘dated’ varchar(50) default NULL,
‘message’ text,
PRIMARY KEY (’msgid’)
) ENGINE=MyISAM;

//The sender field stores the number/ name of the sender
//The recipient of course will be your Clickatell assigned number
//The Dated field will store the timestamp of the sms message
// The Message fields stores the SMS Message

Part 1 | Part 2

Post a Comment

About This Blog

Welcome to the Official Blog of Michael Ofori Amanfo Boateng [www.mboateng.com], an online blog resource for all web designers Ghana. There will be tutorials on Ajax ,ASP, ASP.NET, C#, CFML, Flash, JavaScript, PHP, Python (125) and Ruby on Rails. More

Want to subscribe?

 Subscribe in a reader Or, subscribe via email:
Enter your email address:  
Find entries :