Matt's Life Bytes

Google Voice: {“ok”:false,”data”:{“code”:20}} and (500) Server Error

by Matthew Sullivan on Dec 29, 2009, under Google Voice Coding

So I’ve been coding away on Google Voice Easy SMS lately (a program to send free text messages via Google Voice). I’ve found out something the hard way, hopefully know someone else won’t have to!

When my app would try to send a message to Google, for some people Google would reply with:
{“ok”:false,”data”:{“code”:20}}

or…

{ok:false,data:{code:20}}

or…

(500) Server Error

So what was the problem? Read on. It gets technical from here, just FYI…


My app does this to SMS someone:

POST https://www.google.com/voice/sms/send/

auth=GOOGLE_AUTH_STRING&phoneNumber=PHONE_NUMBER_TO_SMS&text=MY MESSAGE&_rnr_se=GOOGLE_KEY

Google wants phoneNumber, text, and _rnr_se to be URL encoded. For instance ‘text=my message’ becomes ‘text=my%20message’. Most programming languages have some library or class already built to do the job automatically. If you want or need more details on that, just e-mail me.

My problem was that I was not URL encoding the value of _rnr_se and that causes Google to spew either one of the two errors mentioned above. In my defense, I thought the value of _rnr_se was always alphanumeric and therefore didn’t need URL encoding. It took me about 10 hours to figure out the problem; hopefully anyone else with that issue finds this post first!


4 Comments for this entry

  • Maxx Williams

    Mr. Sullivan, you are a genius.

  • Walter Francis

    So shall we expect a 1.2 coming soon which detects/fixes this outgoing quiet failure issue that happens sometimes? Great stuff, thanks for your work!

  • Ashur Khan

    Thank you so much for all your hard work! This is a great app but I keep getting a message after 2 texts that it was not able to send…Any suggestions? Thank you again for all your work!

  • Stéphane Launay

    Hello,
    I found your soft yesterday on openmarket website.
    I installed it , but I get an error corresponding approximately to the error above :
    Communication error; Unable to get value of ‘_rnr_se’ key.
    What should I do to solve it ?
    Thanks in advance & good week end.
    Stéphane LAUNAY

Leave a Reply

Looking for something?

Use the form below to search the site: