Topic: https://brettterpstra.com/sms-from-the-command-line-with-google-voice/
hide preview

What's next? verify your email address for reply notifications!

Evaryont 13y, 195d ago

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.)

remark link
hide preview

What's next? verify your email address for reply notifications!

Evaryont 13y, 195d ago

Also, it's working fine in Arch Linux, running ruby v1.9.2. :-)

hide preview

What's next? verify your email address for reply notifications!

mano vasilakis 13y, 307d ago

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)
from /Users/mano/Documents/Scripts/voicesms user@mydomain.com.rb:61:in
postit'
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?

hide preview

What's next? verify your email address for reply notifications!

mano vasilakis 13y, 320d ago

never mind got it:
voicesms.rb –m message&#092 $variable&#092 more&#092 message

hide preview

What's next? verify your email address for reply notifications!

mano vasilakis 13y, 320d ago

how do you pass a variable to a message?
voicesms.rb -m "message:" $variable #fails

hide preview

What's next? verify your email address for reply notifications!

sfranzyshen 14y, 34d ago

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)
from voicesms.rb:61:in
postit'
from voicesms.rb:90
from voicesms.rb:88:in `each'
from voicesms.rb:88

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 14y, 34d ago

I'm afraid I don't have time to debug this script. The only thing I can tell you is that the only time I've been able to reproduce this error is when the password is incorrect for the account…

hide preview

What's next? verify your email address for reply notifications!

sfranzyshen 14y, 34d ago

nope ... length doesn't matter ...

hide preview

What's next? verify your email address for reply notifications!

sfranzyshen 14y, 34d ago

/usr/lib/ruby/1.8/net/http.rb:2097:in error!': 500 "Internal Server Error" (Net::HTTPFatalError)
from voicesms.rb:61:in
postit'
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 ...

hide preview

What's next? verify your email address for reply notifications!

Kevin Krejca 14y, 75d ago

i'm kinda working on something similar. thanks for the thoughts. did you ever get it working?

thanks again,
kevin

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 14y, 71d ago

It still works for me, and the only way I've been able to replicate the error is if my password is incorrect...

hide preview

What's next? verify your email address for reply notifications!

qork 14y, 104d ago

thanks ;)

hide preview

What's next? verify your email address for reply notifications!

Mike 14y, 118d ago

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)
from /Users/miker/Downloads/2010-11/voicesms.rb:61:in
postit'
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

remark link
hide preview

What's next? verify your email address for reply notifications!

btadmin 14y, 118d ago

Argh, @justin above is having the same issue. Still trying to figure out why… I'll get back to you as soon as we solve it.

hide preview

What's next? verify your email address for reply notifications!

Mike 14y, 119d ago

So very happy.

hide preview

What's next? verify your email address for reply notifications!

justinxreese 14y, 121d ago

I HAVE TO do this!

hide preview

What's next? verify your email address for reply notifications!