"There was an error with your request" in Google Voice

The article describes the process of fixing Google Voice problem “There was an error with your request” and gives a free utility to workaround this situation.

Since August 2015 this solu­tion does not work any­more, because Google have changed con­fig­u­ra­tion of their servers. New inves­ti­ga­tions were not con­duct­ed. I sug­gest to use Call­Cen­tric SIP VoIP ser­vice instead.

The Process

I reg­is­tered Google Voice account and tried to get a phone number.

  1. I clicked Get a Voice num­ber” link, then I want a new num­ber” button.
  2. I entered my for­ward­ing num­ber and ver­i­fied it.
  3. I chose a good Google Voice num­ber and clicked Con­tin­ue”.
  4. I got There was an error with your request. Please try again.” mes­sage. It was a per­ma­nent error.

I tried again and again after some time and noth­ing changed. Then I start googling. The best place to start the search is offi­cial Google Voice prod­uct forum. I read a pinned top­ic called “[Please Read] Num­ber selec­tion error”. It is a very short post, so I cite it here:

If you’re receiv­ing an error mes­sage when try­ing to select a GV num­ber, please note that you are most like­ly encoun­ter­ing an issue because you have used your mobile phone num­ber as a for­ward­ing phone on anoth­er Google Voice account in the last year. If you have, you will not be able to sign up for a new Google Voice num­ber with the mobile num­ber you’re try­ing to use. Please use a dif­fer­ent phone number.

Matt Bar­ilet­ti — Com­mu­ni­ty Manager

OK, this top­ic is about mobile phone num­ber”, and that’s not my case. I start­ed googling again and found noth­ing new relat­ed to my sit­u­a­tion. I’ll tell that this prob­lem is not lim­it­ed to mobile num­bers only.

I decid­ed to replace for­ward­ing phone num­ber which I entered in step 2 to anoth­er one. Unfor­tu­nate­ly, Google Voice inter­face don’t have an option to remove this num­ber. And it became a real prob­lem. In fact, the account became com­plete­ly unusable. 

I reg­is­tered alter­na­tive phone num­ber at Call­cen­tric Inter­net Phone Ser­vice, they give me SIP phone num­ber. By the way, its sound qual­i­ty seems even bet­ter than Google Voice, and they use pro­duc­tion-grade SIP pro­to­col instead of Google’s pro­pri­etary one. I set up their account in Telephone.app and, well, it works real­ly well.

But I am still inter­est­ing in get­ting Google Voice phone num­ber too. I start­ed think­ing how to remove for­ward­ing num­ber from my fresh account. I opened Safari’s Web Inspec­tor and start­ed look­ing into JavaScript code, page resources, etc. I tried to mod­i­fy some inter­nal JS code to cheat the sys­tem, but it did not work.

I’ve found a workaround some­where on the web:

  1. Add the same for­ward­ing num­ber to anoth­er account and ver­i­fy it.
  2. Then it will dis­ap­pears from orig­i­nal account.

I asked my friend to assign this num­ber to his account. The num­ber was assigned suc­cess­ful­ly. I said Whooh!”. I said it too ear­ly. I looked in page’s JS and the for­ward­ing num­ber is still there. It seems it is a bug in Google sub­sys­tem, which breaks archi­tec­tur­al ideas of the pro­gram sys­tem. I don’t think it is a real vul­ner­a­bil­i­ty, so let it stay there. Lat­er, in pri­vate con­ver­sa­tion, Google Secu­ri­ty Team accept­ed there isn’t a sig­nif­i­cant secu­ri­ty impact here. How­ev­er, my prob­lem was get­ting more and more harden.

Then I remem­bered about the iPhone’s client app which sure­ly use some API to com­mu­ni­cate with Google Voice web service.

I start­ed googling this API and found three inter­est­ing prod­ucts: google-voice-java, Google Voice PHP API and pygooglevoice.

  1. Google Voice PHP API authen­ti­cat­ed OK with web ser­vice, but its func­tions are lim­it­ed to few basic calls and don’t have func­tion to remove for­ward­ing number.
  2. pygooglevoice can’t authen­ti­cate with web ser­vice. It seems it has a bro­ken API implementation.
  3. google-voice-java authen­ti­cat­ed OK, has a broad range of API calls and even has phoneDisable call.

I need to make web ser­vice API call to remove for­ward­ing num­ber. I decid­ed to try phoneDisable call first. I start­ed writ­ing an app using google-voice-java framework.

The algo­rithm con­sists of three steps:

  1. Log in into Google Voice.
  2. Get for­ward­ing phones list.
  3. Dis­able the select­ed phone.

It works well with mine friend’s account, it real­ly dis­ables for­ward­ing phone. You can down­load sources here: phoneDisable.zip.

How­ev­er, as it turned out lat­er, dis­abling phone num­ber is not suf­fi­cient to solve the prob­lem. Fur­ther­more, it is crashed with error when run­ning on a fresh Google Voice account. So let’s fix it and find a way to com­plete­ly remove for­ward­ing number.

I opened my friend’s account in Fire­fox with Fire­bug exten­sion and start look­ing into what hap­pens when a user removes for­ward­ing phone num­ber. I chose lit­tle-used num­ber and clicked on Delete” but­ton. Fire­bug give me an excel­lent result — now I know the name of API call to delete the phone and call’s parameters:

Firebug

OK, go fur­ther. Now it’s nec­es­sary to fix crash­es and imple­ment this method in Java code.

The prob­lem leads to crash is that fresh Google Voice account (which has not assigned a Google Voice num­ber yet) do not return a full set of JSON set­tings. Of course it’s impos­si­ble to use getPhonesSorted() method and even AllSettings at all because it will cause NullPointerException. How to get phones list? The only way to do it is to parse HTML of main page and extract JSON array from <script> ele­ment. It is not hard but a bit of a chore:

  1. Parse HTML DOM of main page using jsoup pars­er and find appro­pri­ate <script> tag.
  2. Extract JSON Object from this <script> tag using java.util.regex classes.
  3. Parse extract­ed JSON Object using gvjava.org.json class­es (it is includ­ed with google-voice-java library).

Then let’s patch google-voice-java library (its Voice.java file) and add phoneRemove() method based on infor­ma­tion obtained from Fire­bug. By the way, secu­ri­ty expert Michael Irvin used a very sim­i­lar way to find vul­ner­a­bil­i­ty in Google Voice phone for­ward­ing con­fig­u­ra­tion API (it’s already fixed). You may be inter­est­ed in this arti­cle to learn more about their infra­struc­ture. Ref­er­ence.

Well, now it’s time to say Whooh!”. It works real­ly well. The for­ward­ing num­ber was suc­cess­ful­ly delet­ed and I was able to use phone num­ber from Call­cen­tric and suc­cess­ful­ly reg­is­ter Google Voice number.

You can down­load the final util­i­ty here: phoneRemove.zip. It is ready to use, sources and bina­ry includ­ed. Run from command-line:

$ java -jar build/phoneRemove.jar

It is an inter­ac­tive pro­gram which will ask you for login, pass­word, then it will login to Google account and will show you for­ward­ing phone num­bers you have. You will be asked to choose which phone num­ber to delete (or can­cel the task).

If you got Bad Authen­ti­ca­tion” error even though you entered cor­rect user­name and pass­word, then enable Access for less secure apps” in Google Account Settings.

If you don’t have anoth­er clear” phone num­ber, try to get one from Call­cen­tric Inter­net Phone Ser­vice. Maybe you will love their qual­i­ty of sound even more than Google Voice.

Too hard, yeah? I can tell you more sto­ries about Google bugs, but that is a top­ic for anoth­er article.

Loading comments…

Year of Publication

2013, update 2015