SMSified is currently in Beta. During our initial beta period, messages are free.

Blog


SMSified Powers Apps for Communities Winner

December 16th, 2011 by Mark Headd

Earlier this year, at the Random Hacks of Kindness hackathon in Philadelphia, one team of hacker-activists (Katey Metzroth, Danny Chang and Tim Wisniewski) decided to address the challenge of helping low income Philadelphians find fresh produce in their communities.

The app they developed – PhillySNAP – makes use of the SMSified API to let people find SNAP retailers in their neighborhoods.

This innovative app was honored yesterday by FCC Chairman Julius Genachowski as a winner in the Apps for Communities Challenge

A video overview of the PhillySNAP service can be seen below.

PhillySNAP from Deng-Shun Chang on Vimeo.

In addition, the team worked with the Philadelphia Department of Health and the Food Trust to disseminate information on the program to needy Philadelphians. Some of the Food Trust’s literature featuring PhillySNAP can be seen below.

Congratulations to the entire PhillySNAP team on a job well done!

spacer

spacer

Tags: Philly, RHoK
Posted in SMSified | No Comments »

SMSified’s New REST API Explorer

September 14th, 2011 by cmatthieu

Voxeo Labs, the creators of SMSified, Tropo, Phono, IMified, and other innovative communications services and technologies, has partnered with Apigee to introduce the new SMSified API Explorer!  Now developers can experiment with the SMSified REST API without writing a single line of code!  Yes, it’s that easy and here’s a video to prove it.

Get started with adding inbound and outbound SMS text messaging to your application today.  Using SMSified makes it super simple and it only costs $1 per month for the phone number and only $.01 per message.

Tags: api, apigee, rest, video
Posted in OneAPI, screencasts, SMSified, Tutorials | 6 Comments »

Getting Ready for Node Knockout

August 17th, 2011 by Mark Headd

With the Node Knockout event just over the horizon, I thought it would be interesting to show how easy it is to build a really powerful SMS application using Node.js and CouchDB.

spacer

(Our sister platform, Tropo, is a sponsor of the event as is CouchBase, makers of the CouchDB software used in this demo.)

If you want to use SMSified in your Node Knockout application, simply sign up for an account (it’s free). Then just install the SMSified Node.js module:

npm install smsified

The screen cast below demonstrates an SMS application that accepts an inbound text message through SMSified and sends a response.

All of the details of the exchange are efficiently logged in CouchDB, including the phone number of the sender, the number sent to, the data time of the message and the result of calling the SMSified API to send an SMS response.

The code for this demo app can be found on GitHub.

Note, you’ll need to have the Node.js cradle module for CouchDB installed for this application to work in your environment. You’ll also need an instance of CouchDB.

This application makes use of the CouchDB _changes API – this is a powerful feature of CouchDB that separates it from other NoSQL databases. You can read more about the _changes API here.

Node.js and CouchDB are a potent combination, and if you want to build an SMS application there is no easier platform to integrate with that SMSified.

SMSified + Node.js + CouchDB = A Knockout!

Tags: CouchDB, JavaScript, Node.js, Screencast
Posted in CouchDB, SMSified | 2 Comments »

Team Attendance Tracking Using an SMS Application

June 28th, 2011 by Justin Dupree

As with any for-fun softball/baseball/kickball/handball league, the availability of players can vary widely from week to week. Life has a habit of interfering, especially if you have kids, so ensuring there’s enough players to field a full team can be a difficult process. Such was the case with the Voxeo softball team, but we’re just not the type of people to let a problem like that go unsolved – especially when we have incredibly easy tools like SMSified just sitting there, asking to be used.

This post will walk through the creation of an SMS application – using SMSified, Ruby and Google Spreadsheets – that requests and then stores the expected game attendance for each member of a team of players. The app is written in Ruby, since there’s both a sweet gem for interacting with Google spreadsheets (no reinventing the wheel!) and an SMSified Ruby Library.

We’ll break it down into pieces, since there’s a few different sections – as usual, the requires:

require "google_spreadsheet"
require "sinatra"
require "json"
require "smsified"

The use for “google_spreadsheet” should be pretty obvious; we use “sinatra” as the webserver and framework; “json” is brought in so we can parse the incoming text message data from SMSified and “smsified” should also be obvious. Next portion of the app defines our Sinatra route and a few variables:

post '/' do
   response = JSON.parse(request.env["rack.input"].read)

   message =  response["inboundSMSMessageNotification"]["inboundSMSMessage"]["message"]
   callerID =  response["inboundSMSMessageNotification"]["inboundSMSMessage"]["senderAddress"]
   trigger = message[0..1]
   datetime = message[3..message.length]

The beginning, post '/' do, defines our route as the root of our URL that we add to our phone number in SMSified, which we do here:

spacer

The rest of the section is parsing out JSON and setting some variables with the extracted data. We pull out the message and the sender’s callerID, then run a couple Ruby tricks on the message data. We yank out the first two characters and define it as trigger, and then set the rest of the message content as the datetime. Why we do this is exemplified in the next portion of code:

   if trigger == "Go"

    smsified = Smsified::OneAPI.new(:username => 'sms_user', :password => 'sms_pass')
    smsified.send_sms :sender_address => '13215550100', :address => ['14075550100', '19545550100', '13055550100'], :message => "Can you make it to the game on #{datetime}?"

We’re using the trigger to tell the app this text message is the “trigger” message, which in turn tells SMSified to send an outbound text message to the defined list of numbers; we then include datetime in the message that goes out. To explain this a little better, the initial activation text message sent to the SMSified number might look like this:

Go 6/21 @ 6:30

This activates the app, which then splits up the body of the text into two parts: “Go” (which tells SMSified to send the text message to all the recipients) and “6/21 @ 6:30″ (the date & time for the game, which is inserted into the outbound message). The code to actually send the text message is handled by the SMSified Ruby Library; you just populate the necessary (and clearly named) fields and it sends the POST to SMSified with the data. Note that :sender_address is your SMSified number, which you can access under your Account and then Phone Numbers.

The next portion of code uses the “google_spreadsheet” gem to connect to a particular Google Spreadsheet:

   else
    session = GoogleSpreadsheet.login("goog_user", "goog_pass")
    ws = session.spreadsheet_by_key("YOUR_SPREADSHEET_KEY").worksheets[0]

The spreadsheet key is located in the URL for your Google Spreadsheet, I’ll bold it in this pseudo URL:

https://spreadsheets.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=1234ABCDyvaLmdLmNQ05DSVAzMXc3THFfa3Y0&output=html

The last section also uses the “google_spreadsheet” gem to update particular fields, based on the callerID value:

    if callerID == "tel:+14074095231" 
      ws[2, 1] = message
      ws.save()
    elsif callerID == "tel:+19545550100" 
      ws[2, 2] = message
      ws.save()
    elsif callerID == "tel:+13055550101" 
      ws[2, 3] = message
      ws.save()
    else
      p "Not on the list"
    end

  end

end

In order to start the app, we sent it the “Go 6/21 @ 6:30″ message, which then sent out an message that said “Can you make it to the game on 6/21 @ 6:30?”; we should start getting replies back now with “Yes”, “No”, “Maybe” and we want to save that info to our spreadsheet. This part of the app is assigning a field value to a callerID – a person’s reply to a specific cell on the spreadsheet. If Justin is 14075550100, Kevin is 19545550100 and Dave is 13055550100, our spreadsheet should look something like this:

spacer

Honestly, that’s it. You shouldn’t even need to publish your spreadsheet; you’re using your Google login, so the document can be completely hidden from anyone else if you prefer. This could easily be adjusted to a survey app – send a text to a list of clients, record their answer in a private spreadsheet for your personal review.

Complete app can be downloaded from Github here, use it however you’d like. Questions or concerns? As always, hit us up on the forum.

Posted in Uncategorized | No Comments »

Keeping a Text Log of Received Messages

June 21st, 2011 by Justin Dupree

While receiving text messages is pretty simple – tie a URL to your phone number, any SMS that comes through is automatically redirected to that URL – what you do with the SMS information once it arrives is a different story all together. We already showed you how to work with CouchDB to create a full SMS Management system, but that might be more complex than you really need.

An easier and far simpler example would be a basic app that takes the redirected SMS content sent to your URL by SMSified, interprets it, formats the content so it’s easier to read and then writes the details into a plain text file. Every language has a way to do that, but since we currently have SMSified libraries available in PHP, Ruby and Node.js, we’ll show you how to do it in each of those languages. Each works a little differently, especially since the PHP SMSified library includes a couple shortcut functions to extract info out of the JSON content.

Since PHP is the unique case, we’ll start there:

<?php 
require 'smsified-php/inbound.class.php';

$json = file_get_contents("php://input");

$inbound = new InboundMessage($json);

$time = $inbound->getTimeStamp();
$message = $inbound->getMessage();
$sender = $inbound->getSenderAddress();

$text = "From: ".$sender."\n"."Message: ".$message."\n"."Date & Time: ".$time."\n\n";

$fh = fopen('log.txt', 'a');
fwrite($fh, $text);

?>

The app first requires inbound.class.php from the PHP SMSified library, retrieves the content of the JSON sent to the app by SMSified when an inbound message comes through, then splits it up into the time the message was sent, the message that was sent and who sent it. It then adds those together for one formatted variable, which is then added to a text file called log.txt using fopen and fwrite. Note the inclusion of \n, which gives us some clean newline formatting both after each line and to space between records.

The Ruby library doesn’t have the same shortcut options available yet, but it’s still pretty short:

require 'sinatra'
require 'json'

post '/smsified.rb' do

  response = request.env["rack.input"].read
  response = JSON.parse(response)

  message =  response["inboundSMSMessageNotification"]["inboundSMSMessage"]["message"]
  callerID =  response["inboundSMSMessageNotification"]["inboundSMSMessage"]["senderAddress"]
  time =  response["inboundSMSMessageNotification"]["inboundSMSMessage"]["dateTime"]

  text = "From: #{callerID} \nMessage: #{message}\nDate & Time: #{time}\n\n"

  File.open('log.txt', 'a') {|f| f.write(text) }

end

The app initially requires sinatra and json, to run the webserver and interpret JSON respectively, and then reads and interprets the JSON sent to the app by SMSified, parses it into individual fields, rebuilds the data into a single formatted variable and writes the content to log.txt using File.open and fwrite.

The Node.js app is probably the most complex, mostly because the file open/file write portion is a little heavier than it is in the other languages:

var http = require('http');
var fs = require('fs');

var server = http.createServer(function (request, response) {

    request.addListener('data', function(data){
        json = data.toString();
    });

    request.addListener('end', function() {

        var sms = JSON.parse(json);
        var sender = sms.inboundSMSMessageNotification.inboundSMSMessage.destinationAddress;
        var message = sms.inboundSMSMessageNotification.inboundSMSMessage.message;
        var time = sms.inboundSMSMessageNotification.inboundSMSMessage.dateTime;

        var text = "From: "+sender+"\n"+"Message: "+message+"\n"+"Date & Time: "+time+"\n\n";

        fs.open("log.txt", "a", undefined, function(err, fd) {
            if (err) throw err;
            fs.write(fd, text, null, "utf8", function(err, written) {
                if (err) throw err;
                fs.closeSync(fd);
            });

            response.end();

        });
    });
}).listen(8000);

The app requires http to create the webserver and fs for the file open and file write portion. It then creates the server, adds a couple listeners to pull in the JSON and parses it into individual fields. The app next combines the fields into a single formatted variable and then writes them to the log.txt file.  Assuming we used each of these apps to send to the same file, the output should look like this:

From: tel:+14075550100 Message: PHP Test Date & Time: 2011-06-21T18:22:33.946Z

From: tel:+14075550100 Message: Ruby Text Date & Time: 2011-06-21T19:42:42.820Z

From: tel:+14075550100 Message: Node Test Date & Time: 2011-06-21T20:14:53.389Z

Bam, quick and easy logging for inbound messages in three different languages. Let us know in the forums if you have any trouble with the apps or suggestions, we’re happy to help.

Posted in Uncategorized | No Comments »

Sending SMS messages with C# and SMSified

June 20th, 2011 by Mark Headd

Here on the SMSified blog, we’ve provided lots of examples of how to use the SMSified API to quickly and easily send outbound text messages.

spacer

If you review some of our previous posts, you’ll see lots of good examples and tutorials on using PHP, Ruby and Node.js to send outbound SMS messages. With all of that in mind, I thought it was time to work up a quick example for our friends that use C#.

While we don’t yet have a C# library for working with our API (we’re working on one), it’s really easy to send outbound text messages with C# using SMSified.

The only potentially confusing issue with using C# with SMSified has to do with how the C# HttpWebRequest class uses authentication credentials.

When you use the Credentials property on the HttpWebRequest class, your application will expect to receive a challenge for credentials via an HTTP 401 response with an authentication realm. SMSified will not return an authentication realm with a 401 response, so trying to authenticate this way to send an outbound SMS message will fail.

The proper way to authenticate with SMSified is to send your credentials (via HTTP basic authentication) in a header on the original HTTP request. This is pretty straightforward in C#:

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
string authInfo = "username:password";
authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
req.Headers["Authorization"] = "Basic " + authInfo;

In the above example, “username” and “password” would be replaced with your SMSified credentials.

A full working example of sending an outbound text message in C# using SMSified can be found here.

We’ll be announcing the release of our C# library in the near future, but if you would like to incorporate SMS messages into your C# application, this post and sample code will get you started.

Tags: C#, Tutorial, Windows
Posted in SMSified, Tutorials | No Comments »

Want to Learn About SMSified? Join the VUC Call on Friday, June 17, at 12noon US Eastern

June 16th, 2011 by Dan York

spacer Want to learn all about SMSified and how you can build “nearly any SMS application you can imagine“? If so, join the VoIP Users Conference call tomorrow to learn all about SMSified and what you can do. Voxeons Chris Matthieu and Dan York will both be on the call, as may be a few others. The folks joining the VUC calls are a fun group and the discussion is usually both enjoyable and wide-ranging.

The call is tomorrow, Friday, June 17, 2011, at 12:00noon US Eastern.

You can join the live call via SIP, Skype or the regular old PSTN. There is also an IRC backchannel that gets heavy usage during the call.

The call will be recorded so you can always listen later if you are unable to attend live.

Tags: VUC
Posted in Uncategorized | No Comments »

Using SMSified and Shopify to Connect with Customers

June 8th, 2011 by Mark Headd

Shopify is awesome if you are looking to set up an online store to start selling your product – they take care of all of the hard stuff, and make getting your online storefront up quick and easy.

spacer

Shopify also has a great API for building applications to work with your online storefront, or for selling an application to online store owners.

When you combine the power of the SMSified platform with the Shopify API, you can build some really powerful applications in no time that can make it easy to connect with your store’s customers and sell your products.

The following screencast walks through a simple demo application – code available on GitHub – that uses the Shopify API to obtain a list of customers for an online store.

The application sends all customers with a mobile number a simple text message through the SMSified platform advertising an upcoming sale.

Shopify actually has a number of different client libraries for working with their API – and a full Node.js module is forthcoming as well.

So after you sign up for SMSified, and you create your storefront on Shopify, head on over to the Shopify developer site and pick the library of your choice to get started.

With powerful platforms and APIs like SMSified and Shopify, it’s never been easier to manage your online business, and easily connect with customers to sell your goods and services.

Posted in screencasts, SMSified, Tutorials | 1 Comment »

SMSified Helps Philadelphians Find Fresh Produce

June 7th, 2011 by Mark Headd

At the Random Hacks of Kindness (RHoK) event in Philadelphia this past weekend, one team of hacker-activists decided to address the challenge of helping low income Philadelphians find fresh produce in their communities.

spacer

The team quickly identified a data source for retailers that participate in the Supplemental Nutrition Assistance Program (SNAP), and were able to extract locations (including latitude and longitude) for retailers in Philadelphia. They were also able to pull together and compile lists for farmers markets, urban farms and community gardens.

All of these locations provide fresh, locally grown produce that is available to people receiving SNAP benefits. One challenge facing SNAP beneficiaries is quickly and easily finding the location of stores or retailers in their neighborhoods where they can use their benefits to obtain healthy, fresh produce.

spacer

The PhillySNAP team decided to address this issue – To do so, they turned to SMSified.

SMS (Short Message Service, also known popularly as “text messaging”) can be an ideal way to communicate with the widest possible group of users.

Almost all mobile phones are capable of sending and receiving SMS messages, whether they are newer “smart” phones with more sophisticated applications and web access, or older cell phones without these features.

Since location information can be delivered in a highly compact format, it is a good fit for SMS messaging.

SMSified’s powerful and simple to use REST API made it (pun intended) a snap to develop an SMS based application to that provides the locations of SNAP retailers and farmers markets.

The result of the team efforts can be viewed here. The PhillySNAP team was also recognized as one of the winners of the Philly RHoK event.

Congratulations to the PhillySNAP team and to all of the other participants and winners in RHoK events taking place across the country and around the around the world this past weekend.

Tags: opengov, Philly, RHoK, SMS
Posted in SMSified | No Comments »

Create an SMS Management System with CouchDB and PHP

May 27th, 2011 by Mark Headd

In an earlier post, I walked through an example project demonstrating how to use the Node.js module for SMSified. We’ve also demonstrated how to use the SMSified Ruby Gem.

In this post and accompanying screencast, I’m going to walk through a sample project that uses another of our language bindings for the SMSified API – the SMSified PHP library.

In this example, we’ll create a management system for storing inbound SMS messages using PHP and CouchDB. In addition to the SMSified PHP library, I make use of the excellent Sag PHP library for CouchDB.

The code for the PHP script I demonstrate in this screencast can be found on GitHub.

If you didn’t grok all of the CouchDB design document functions I showcased, you can get those from GtiHub as well.

But if you are running CouchDB locally, and want to quickly and easily acquire all of the functions I demonstrated, you can simply take advantage of CouchDB’s awesome replication feature.

Simply run the following at the command line to replicate a sample DB we’ve created on one of our hosted CouchDB instances that includes the design document I use in this screencast.

First, create a local ‘smsrecords’ database:

~$ curl -X PUT 127.0.0.1:5984/smsrecords

Then replicate to the new local database:

~$ curl -X POST 127.0.0.1:5984/_replicate \
  -H 'Content-type: application/json' \
  -d '{"source":"tropo.couchone.com/smsrecords", "target": "smsrecords"}'

Creating a permanent record for all of your text messages in a powerful data store like CouchDB couldn’t be easier.

Stay tuned for more PHP awesomeness from SMSified!

Tags: CouchDB, PHP, SMSified
Posted in CouchDB, SMSified, Tutorials | 1 Comment »

« Older Entries
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.