rithvikvibhu/GHLocalApi

NeedsBrowser error with get_tokens.py

Opened this issue · 6 comments

Migrated from this gist comment https://gist.github.com/rithvikvibhu/952f83ea656c6782fbd0f1645059055d#gistcomment-3586276

@cicero200272:

I am requested to log in (using a browser) first. When I copy & paste the URL to a browser window, I can provide my credentials, but then I am stuck on a "One moment please..." page which does not reload. Does anybody else have this kind of problem?

@rithvikvibhu:

Not sure what you mean @cicero200272. Which URL did you copy? This script doesn't need any browser or a website to visit at all.

@cicero200272:
screen1

Have you set the USERNAME and PASSWORD fields in the script?

Verify:

  • Do you have 2FA enabled? If so, then create an app password and use that instead.
  • Make sure the USERNAME variable is just the username, not the complete email address (@gmail.com).
  • Are the overrides unchanged? (all of them set to None is fine).

Hi @rithvikvibhu, thanks for looking into this! I did replace USERNAME and PASSWORD with my credentials.

  • No 2FA
  • I use USERNAME without email extension
  • All set to None

did you solve this? I'm getting your same error.

Okay this has worked from people at kiwiz/gkeepapi#20:

  • Set the device_id override to a random value with _get_device_id() (so that it doesn't change between script runs)
  • Run the script - if it works, all good, otherwise continue
  • Visit https://accounts.google.com/DisplayUnlockCaptcha and complete captcha
  • Try the script again - should work now

This applies to accounts without 2FA also.

Visiting the captcha page did the trick! Thanks again for your help.

Hi!!
I have been trying to get the tokes but I'm experiencing the same issue reported here.
The Google web captcha is not working any more.
I have tried all other solutions with no luck. ..