kiwiz / gkeepapi

An unofficial client for the Google Keep API.
MIT License
1.54k stars 114 forks source link

403 exception apparently on googleapis url #87

Closed jp5282 closed 4 years ago

jp5282 commented 4 years ago

Please make sure you've done the following before submitting your issue:

zack-ashen commented 4 years ago

I have also been getting a 403 exception. However, only on my account when using an app password. I get the stack trace:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/zack/.local/lib/python3.8/site-packages/gkeepapi/__init__.py", line 695, in login
    self.load(auth, state, sync)
  File "/home/zack/.local/lib/python3.8/site-packages/gkeepapi/__init__.py", line 741, in load
    self.sync(True)
  File "/home/zack/.local/lib/python3.8/site-packages/gkeepapi/__init__.py", line 996, in sync    changes = self._reminders_api.list()
  File "/home/zack/.local/lib/python3.8/site-packages/gkeepapi/__init__.py", line 592, in list
    return self.send(
  File "/home/zack/.local/lib/python3.8/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'}
jp5282 commented 4 years ago

I should clarify also that I too am using app password given MFA access to my Google account.

macaroni57 commented 4 years ago

Ditto using app password with same traceback. Just encountered this tonight. I upgraded to 0.11.15 and still have error.

`Python Scripts/keepExtractor.py', wdir='F:/u/mike/Documents/Python Scripts')
Traceback (most recent call last):

  File "F:\u\mike\Documents\Python Scripts\keepExtractor.py", line 11, in <module>
    keep.login('mac....', '....')

  File "C:\Users\mike\anaconda307a\lib\site-packages\gkeepapi\__init__.py", line 695, in login
    self.load(auth, state, sync)

  File "C:\Users\mike\anaconda307a\lib\site-packages\gkeepapi\__init__.py", line 741, in load
    self.sync(True)

  File "C:\Users\mike\anaconda307a\lib\site-packages\gkeepapi\__init__.py", line 996, in sync
    changes = self._reminders_api.list()

  File "C:\Users\mike\anaconda307a\lib\site-packages\gkeepapi\__init__.py", line 595, in list
    json=params

  File "C:\Users\mike\anaconda307a\lib\site-packages\gkeepapi\__init__.py", line 229, in send
    raise exception.APIException(error['code'], error)

APIException: {'errors': [{'domain': 'global', 'reason': 'forbidden', 'message': 'Forbidden'}], 'code': 403, 'message': 'Forbidden'}`
kiwiz commented 4 years ago

Something has changed with the Reminders API. I don't have time to debug this atm, so I'm going to disable it. 0.11.16 should fix the problem.

macaroni57 commented 4 years ago

Thank you for your fast response. That change worked for me.