pygooglevoice: Login fails. Anyone able to login?

Using the master version from this repo. It gives the login failure error.

~# gvoice send_sms +18005551212 "Test Message... "
Login failed. Retry?[Y/n]

When you run sms.py to get a stack trace it says:

~/pygooglevoice/examples # python sms.py
Traceback (most recent call last):
  File "sms.py", line 5, in <module>
    voice.login()
  File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 96, in login
    raise LoginError
googlevoice.util.LoginError

The code raising the exception is in voice.py line 96

        try:
            assert self.special
        except (AssertionError, AttributeError):
            raise LoginError

From #21 #22 and #24 it makes no difference when you modify the LOGIN url in settings.py to remove all get parameters except service=grandcentral :

#LOGIN = 'https://accounts.google.com/ServiceLogin?service=grandcentral&passive=1209600&continue=https://www.google.com/voice&followup=https://www.google.com/voice&ltmpl=open'
LOGIN = 'https://accounts.google.com/ServiceLoginAuth?service=grandcentral'

Anyone else getting this Login Failed error ?

Could the login be failing because this code is using both GET and POST parameters, while the login web page itself uses only POST parameters ?

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 68 (19 by maintainers)

Commits related to this issue

Most upvoted comments

The LOGIN_POST continue link seems to be the best place to put it. &continue=https://www.google.com/voice/redirection/voice

After testing, I found the regex is correct. The problem is that even though the url for settings.INBOX is correct, urlopen is getting the mobile version of the page and _rnr_se is not on the mobile version, only the desktop version. I’ve tried various user agent strings but was unsuccessful in getting the desktop version. I hope someone can add some input here.

Turns out it is all related to two-factor authentication not working, reported in another issue.