Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running gvoice li returning urllib2.HTTPError: HTTP Error 400: Bad Request #53

Open
bryanlavergne opened this issue Apr 11, 2018 · 11 comments

Comments

@bryanlavergne
Copy link

I've been experiencing the seemingly inevitable problem of trying to only login with pygooglevoice. I've gotten this far, but am now stuck with this error.

After using pip2.7 install (my Python 3.6 installs have returned errors with the configparser) and setting up my .gvoice file, I get the following after running gvoice li from terminal in OS X 10.13.4.

I've had a hard time parsing the code as to how the URL is built; not sure what to do.

  File "/usr/local/bin/gvoice", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/bryanlavergne/Programming/Python/pygooglevoice/bin/gvoice", line 79, in <module>
    login()
  File "/Users/bryanlavergne/Programming/Python/pygooglevoice/bin/gvoice", line 49, in login
    voice.login(options.email,options.passwd)
  File "/Users/bryanlavergne/Programming/Python/pygooglevoice/googlevoice/voice.py", line 76, in login
   result = self.__do_page('login_post', {'Email': email, 'Passwd': passwd, 'gxf': gxf})
  File "/Users/bryanlavergne/Programming/Python/pygooglevoice/googlevoice/voice.py", line 280, in __do_page
    return urlopen(Request(pageuri, data, headers))
  File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 400: Bad Request
@chris001
Copy link

Looks like the li (login) command is broken. You can just run the gvoice command and it will either prompt you to login interactively, or log in with the credentials saved in your user's .gvoice settings file saved in your home directory.

@bryanlavergne
Copy link
Author

I used gvoice alone without the li command and it returned the same error. I tried removing my username and password from .gvoice then using gvoice again, which in then prompted for my username and password. But, after all that, it returns the same error.

Seems like we're still stuck at the same issue, even after not using li.

@chris001
Copy link

Which version you using? From this repo the master branch?

@bryanlavergne
Copy link
Author

Correct. I made sure to delete everything and I downloaded the master branch from this repo (pettazz/pygooglevoice).

I used pip2.7 install

@chris001
Copy link

chris001 commented Apr 11, 2018

Did you perform the DUC (display unlock captcha) on your G account for the purposes of allowing cleartext password login from your previously unseen (to google) IP address? https://accounts.google.com/b/0/displayunlockcaptcha NOTE: this is the biggest thing most people miss because it's so poorly documented because the whole world is moving away from cleartext login for obvious reasons.

@bryanlavergne
Copy link
Author

I did try that, I saw that in another Issues thread.

I tried it again just now and confirmed that I did not have Multi-factor Authentication on as well. Used gvoice, typed in my info, same HTTP Error 400 return.

@chris001
Copy link

chris001 commented Apr 11, 2018

Can you try opening a browser from the same OS X machine and log into voice.google.com web interface

@bryanlavergne
Copy link
Author

Tried it now, I was able to log in.

I was already logged in in my current browser session; so I logged out, went to voice.google.com, clicked Sign In, had to select the name of my account since it recognizes my browser, it prompted for a password then succeeded.

@chris001
Copy link

OK great so the command gvoice is logging in now for you. These login issues come down to tighter login restrictions on the G side on letting unseen devices log in with valid credentials, due to higher rates of stolen credentials being used to attempt to login to G accounts from new IP addresses or from new devices.

@bryanlavergne
Copy link
Author

I should clarify, sorry: I was able to log into the web interface.

’gvoice’ still returns the same error as above.

@chris001
Copy link

Can you try it again with the code from this repo: https://github.com/EspaceNetworks/pygooglevoice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants