GVoice command line SMS revisited

Google Voice icon

Thanks to a comment from Evaryont on the original SMS from the command line with Google Voice post, a problem that was causing Error 500s in the script has been solved.

Check the original post for the script, and change the line (around line 90)

rnrse = newres.match(/’_rnr_se’: ‘([^’]+)’/)[1]

to:

rnrse = CGI.escape(newres.match(/’_rnr_se’: ‘([^’]+)’/)[1])

The CGI escaping should help with the Google’s changes to the _rnr_se variable. Evaryont also notes that the script works great in Arch Linux with Ruby 1.9.2. For 1.9 compatibility (thanks to David for clarification in the comments below), remove the -rjcode from the hashbang on the first line, and add require 'jcode' if RUBY_VERSION < '1.9' below. Have fun!

Brett Terpstra

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff on Twitter, GitHub, and Mastodon. Keep up with this blog by subscribing in your favorite news reader.

This content is supported by readers like you.

Join the conversation