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

An 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 solution does not work anymore, because Google have changed configuration of their servers. New investigations were not conducted. I suggest to use CallCentric SIP VoIP service instead.

The Process

I registered Google Voice account and tried to get a phone number.

  1. I clicked "Get a Voice number" link, then "I want a new number" button.
  2. I entered my forwarding number and verified it.
  3. I chose a good Google Voice number and clicked "Continue".
  4. I got "There was an error with your request. Please try again." message. It was a permanent error.

I tried again and again after some time and nothing changed. Then I start googling. The best place to start the search is official Google Voice product forum. I read a pinned topic called "[Please Read] Number selection error". It is a very short post, so I cite it here:

If you're receiving an error message when trying to select a GV number, please note that you are most likely encountering an issue because you have used your mobile phone number as a forwarding phone on another Google Voice account in the last year.  If you have, you will not be able to sign up for a new Google Voice number with the mobile number you're trying to use. Please use a different phone number.

Matt Bariletti - Community Manager

OK, this topic is about "mobile phone number", and that’s not my case. I started googling again and found nothing new related to my situation. I'll tell that this problem is not limited to mobile numbers only.

I decided to replace forwarding phone number which I entered in step 2 to another one. Unfortunately, Google Voice interface don’t have an option to remove this number. And it became a real problem. In fact, the account became completely unusable.

I registered alternative phone number at Callcentric Internet Phone Service, they give me SIP phone number. By the way, its sound quality seems even better than Google Voice, and they use production-grade SIP protocol instead of Google’s proprietary one. I set up their account in Telephone.app and, well, it works really well.

But I am still interesting in getting Google Voice phone number too. I started thinking how to remove forwarding number from my fresh account. I opened Safari’s Web Inspector and started looking into JavaScript code, page resources, etc. I tried to modify some internal JS code to cheat the system, but it did not work.

I’ve found a workaround somewhere on the web:

  1. Add the same forwarding number to another account and verify it.
  2. Then it will disappears from original account.

I asked my friend to assign this number to his account. The number was assigned successfully. I said "Whooh!". I said it too early. I looked in page's JS and the forwarding number is still there. It seems it is a bug in Google subsystem, which breaks architectural ideas of the program system. I don't think it is a real vulnerability, so let it stay there. Later, in private conversation, Google Security Team accepted there isn't a significant security impact here. However, my problem was getting more and more harden.

Then I remembered about the iPhone's client app which surely use some API to communicate with Google Voice web service.

I started googling this API and found three interesting products: google-voice-java, Google Voice PHP API and pygooglevoice.

  1. Google Voice PHP API authenticated OK with web service, but its functions are limited to few basic calls and don’t have function to remove forwarding number.
  2. pygooglevoice can’t authenticate with web service. It seems it has a broken API implementation.
  3. google-voice-java authenticated OK, has a broad range of API calls and even has phoneDisable call.

I need to make web service API call to remove forwarding number. I decided to try phoneDisable call first. I started writing an app using google-voice-java framework.

The algorithm consists of three steps:

  1. Log in into Google Voice.
  2. Get forwarding phones list.
  3. Disable the selected phone.

It works well with mine friend's account, it really disables forwarding phone. You can download sources here: phoneDisable.zip.

However, as it turned out later, disabling phone number is not sufficient to solve the problem. Furthermore, it is crashed with error when running on a fresh Google Voice account. So let’s fix it and find a way to completely remove forwarding number.

I opened my friend's account in Firefox with Firebug extension and start looking into what happens when a user removes forwarding phone number. I chose little-used number and clicked on "Delete" button. Firebug give me an excellent result—now I know the name of API call to delete the phone and call's parameters:


OK, go further. Now it's necessary to fix crashes and implement this method in Java code.

The problem leads to crash is that fresh Google Voice account (which has not assigned a Google Voice number yet) do not return a full set of JSON settings. Of course it's impossible 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> element. It is not hard but a bit of a chore:

  1. Parse HTML DOM of main page using jsoup parser and find appropriate <script> tag.
  2. Extract JSON Object from this <script> tag using java.util.regex classes.
  3. Parse extracted JSON Object using gvjava.org.json classes (it is included with google-voice-java library).

Then let's patch google-voice-java library (its Voice.java file) and add phoneRemove() method based on information obtained from Firebug. By the way, security expert Michael Irvin used a very similar way to find vulnerability in Google Voice phone forwarding configuration API (it's already fixed). You may be interested in this article to learn more about their infrastructure. Reference.

Well, now it’s time to say "Whooh!". It works really well. The forwarding number was successfully deleted and I was able to use phone number from Callcentric and successfully register Google Voice number.

You can download the final utility here: phoneRemove.zip. It is ready to use, sources and binary included. Run from command-line:

$ java -jar build/phoneRemove.jar

It is an interactive program which will ask you for login, password, then it will login to Google account and will show you forwarding phone numbers you have. You will be asked to choose which phone number to delete (or cancel the task).

If you got "Bad Authentication" error even though you entered correct username and password, then enable "Access for less secure apps" in Google Account Settings.

If you don't have another "clear" phone number, try to get one from Callcentric Internet Phone Service. Maybe you will love their quality of sound even more than Google Voice.

Too hard, yeah? I can tell you more stories about Google bugs, but that is a topic for another article.

Loading comments…


Year of Publication