GHLocalApi icon indicating copy to clipboard operation
GHLocalApi copied to clipboard

NeedsBrowser error with get_tokens.py

Open rithvikvibhu opened this issue 4 years ago • 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

rithvikvibhu avatar Jan 09 '21 03:01 rithvikvibhu

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).

rithvikvibhu avatar Jan 09 '21 03:01 rithvikvibhu

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

cicero200272 avatar Jan 09 '21 15:01 cicero200272

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

allezacc avatar Jan 18 '21 14:01 allezacc

Okay this has worked from people at https://github.com/kiwiz/gkeepapi/issues/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.

rithvikvibhu avatar Jan 19 '21 04:01 rithvikvibhu

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

cicero200272 avatar Jan 19 '21 20:01 cicero200272

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. ..

SportsApps avatar Jun 04 '23 12:06 SportsApps