Google Voice and SMS Web Apps
Posted: January 13th, 2010 | Author: Damon Haidary | Filed under: Scripting | Tags: google, google voice, grand central, sms | No Comments »When I received my invite to Google Voice several months ago I wasn’t all that excited. Having been a Grand Central user I thought I knew what to expect so I let the invite sit in my inbox for a while. That was a mistake. Not only did the folks at Google clean up the interface, they also added a few features like voicemail transcription and SMS.
While looking through the settings I noticed an option to forward SMS messages to your email.
That’s a nice feature but what might not be so obvious at first is that you can also respond to those emails to text the person back!
This gives us access to a carrier independent SMS-to-Email gateway from our own apps. All you have to do is set up an email address that forwards email to a script of your choice (how you do this depends on your host). The script then parses the email and takes action depending on the contents (the SMS) and optionally responds to the user.
It sounds fairly simple and it is but there’s a couple caveats. First, you might notice that the email address above isn’t editable. For some reason unknown to me the SMS forwarding address has to be the same as the voicemail notification address. This means you’ll either have to give up voicemail notifications or your script will be responsible for forwarding them to their proper destination.
It’s not important that voicemail notifications be enabled, only that the notification address is set correctly.
The notification address defaults to the one on file for your Google account so you’ll need to add a new “alternate” address for your script to Google Voice. This means you must first set your email up with a normal inbox so that you can confirm it. Only after it has been confirmed should you change it to start forwarding to your script.
The first time someone texts your number, Google appends an extra tip to the message body so it’s important to use the message only up until an optional new line character. In case you want one script to handle more than one number, or if you want to grab the number of the user, both the “to” and “from” numbers are included in the reply address (e.g. 17077098226.17775551234.59P8fXqLuM@txt.voice.google.com).
Here’s a working example for you to play with. If you text my Google Voice number “(707) 709 – 8226“, your message should appear in the box below. You can reload the page or click the box to refresh it. If the load is too high or if there’s much abuse I’ll have to disable it but for now go ahead and try it out.
Example is now disabled.
Disclaimer: This is only a proof of concept. Personal use of SMS forwarding is probably fine but please do your own research and consult Google first. If you represent Google and would like this example removed you can contact me at damon@statusbarn.com.
del.icio.us
Digg
Facebook
Last.fm
Youtube