I have been building apps recently that integrate a REST API which subscribes users to a Drupal web app via SMS, they are simultaneously subscribed in the telecom operators database. Conditions must be checked to keep the users status in sync with Drupal and the operator. Other conditions that I won’t cover here include recurring billing or the free trial period.
This is a practical example of how using the REST protocol allows technologies that are completely different to communicate with each other. The technologies in our stack include SMS, mobile billing and a Drupal web app.
First create the URL endpoint with a callback function by using hook_menu
function my_module_menu() {
$items['my_url/send'] = array(
'title' => 'send',
'page callback' => 'my_module_send_page',
'access callback' => TRUE
);
return $items;
}