Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import gkeepapi
>>> import getpass
>>> gkeepapi.Keep()
<gkeepapi.Keep object at 0x000001B86923C438>
>>> keep = _
>>> keep.login("********@********", getpass.getpass())
Password:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\EcmaXp\AppData\Roaming\Python\Python36\site-packages\gkeepapi\__init__.py", line 363, in login
ret = auth.login(username, password, get_mac())
File "C:\Users\EcmaXp\AppData\Roaming\Python\Python36\site-packages\gkeepapi\__init__.py", line 67, in login
raise LoginException(res.get('Error'), res.get('ErrorDetail'))
gkeepapi.LoginException: ('NeedsBrowser', 'To access your account, you must sign in on the web. Touch Next to start browser sign-in.')```
You need to allow an application to be added via this URL, it will simulate the recaptcha check:
gkeepapi and the packaged used for the Android Application settings don’t support recaptcha, and that’s how google blocks you initially.
I experienced this issue myself when i was trying to test out gkeepapi. Funny thing is, I had disabled two-step authentication and the issue still occurred. So I thought what would happen if I enable two step authentication for my google account to be able to generate app password for my script. It turns out that it worked that way 😃 Hope this helps someone.
I don’t have 2-factor enabled. This means also there is no option for me to create an app password. I still get the error.
Here they suggest 2 options:
Using a fresh install with Python 3.6 gives me this error:
#24 should address this.
What worked for me
node.py(see #24).Keep.loginaccept a third parameterandroid_idand pass in one of your Android devices.keep = keep.login('youremail@gmail.com', getpass.getpass(), 'your_android_mac')can you use an app pass if getpass() isn’t already?
Added a note to the readme for now.
This was what worked for me. I’m using my own test (Google) account with no 2FA mechanism enabled, in case anyone was wondering.
success. thanks!
if Error value are equal as “NeedBrowser” then fireing customized warning also help.