The reason there is a 500 error is that Google's servers are tripping up on the _rnr_se
variable now includes characters like +/=
. Looks like a base64, but watching the network traffic in Firebug shows that Google's javascript sends the raw value without any modifications.
So you need to replace line 90 with the following line. That's it! No other changes are necessary.
rnrse = CGI.escape(newres.match(/'_rnr_se': '([^']+)'/)[1])
(The change: Surround the matched value in a CGI.escape call, so that +/=
is url encoded for Google's sake.)
Google has added support for google voice in their google apps product. Unfortunately when I make these adjustments to the script:
ACCOUNT = 'user@mydomain.com' # managed by google and text works
PASSWORD = 'mypass' #alphanumeric pass no strange characters
the script fails with errors:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:2097:in error!': 500 "Internal Server Error" (Net::HTTPFatalError)
postit'
from /Users/mano/Documents/Scripts/voicesms user@mydomain.com.rb:61:in
from /Users/mano/Documents/Scripts/voicesms user@mydomain.com.rb:90
from /Users/mano/Documents/Scripts/voicesms user@mydomain.com.rb:88:in `each'
from /Users/mano/Documents/Scripts/voicesms user@mydomain.com.rb:88
Can someone please help me out?
root@pbx:~ $ ruby voicesms.rb -n +15558882222 -m "or this one" -u 970dogwalk@gmail.com:password
Message sent to +15558882222
root@pbx:~ $ ruby voicesms.rb -n +15558882222 -m "or this one" -u 1970dogwalk@gmail.com:password
/usr/lib/ruby/1.8/net/http.rb:2097:in error!': 500 "Internal Server Error" (Net::HTTPFatalError)
postit'
from voicesms.rb:61:in
from voicesms.rb:90
from voicesms.rb:88:in `each'
from voicesms.rb:88
/usr/lib/ruby/1.8/net/http.rb:2097:in error!': 500 "Internal Server Error" (Net::HTTPFatalError)
postit'
from voicesms.rb:61:in
from voicesms.rb:90
from voicesms.rb:88:in `each'
from voicesms.rb:88
I have two google voice accounts ... one is 970dogwalk@gmail.com and the other one is 1970dogwalk@gmail.com. When I use the 970dogwalk number everything is fine, but when I use the 1970dogwalk@gmail.com I get the error above ... maybe it has something to do with the username, since everything else is identical. Hope we can figure this one out ... I really need to use the 1970dogwalk account to send sms messages.
Maybe it has something to do with the length of the username ... i will setup another test with an 11 char length account ...
Hmm...
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:2097:in error!': 500 "Internal Server Error" (Net::HTTPFatalError)
postit'
from /Users/miker/Downloads/2010-11/voicesms.rb:61:in
from /Users/miker/Downloads/2010-11/voicesms.rb:90
from /Users/miker/Downloads/2010-11/voicesms.rb:88:in `each'
from /Users/miker/Downloads/2010-11/voicesms.rb:88