Nekmo/gkeep

gkeepapi.exception.APIException Global Forbidden 403

Closed this issue · 2 comments

I have tried with two GMail accounts; and one works while the other does not.

Initially, the non-working account did have Two-Factor and I was using an App Password. Since, I have disabled 2FA, and even set password to same as the working account. I have tried with and without Less Secure Apps enabled (the working account does not have it enabled).

Regardless, I receive:

Traceback (most recent call last):
  File "/home/matthewddunlap/gkeep/bin/gkeep", line 7, in <module>
    catch(cli)()
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/google_keep_tasks/exceptions.py", line 44, in wrap
    fn(*args, **kwargs)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/click/core.py", line 1256, in invoke
    Command.invoke(self, ctx)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/google_keep_tasks/management.py", line 16, in cli
    google_keep.login_or_input()
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/google_keep_tasks/auth.py", line 70, in login_or_input
    self.keep.login(username, password)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/gkeepapi/__init__.py", line 695, in login
    self.load(auth, state, sync)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/gkeepapi/__init__.py", line 741, in load
    self.sync(True)
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/gkeepapi/__init__.py", line 996, in sync
    changes = self._reminders_api.list()
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/gkeepapi/__init__.py", line 595, in list
    json=params
  File "/home/matthewddunlap/gkeep/lib/python3.7/site-packages/gkeepapi/__init__.py", line 229, in send
    raise exception.APIException(error['code'], error)
gkeepapi.exception.APIException: {'errors': [{'domain': 'global', 'reason': 'forbidden', 'message': 'Forbidden'}], 'code': 403, 'message': 'Forbidden'}

I am using Python 3.7.7

This issue was reported an hour later by jp5282 in gkeepapi: #87 403 exception apparently on googleapis url and resolved in commit 2a5cc73 as version 0.11.16.

Nekmo commented

Thanks for your report!