gkeepapi.APIException
See original GitHub issueI am receiving the following APIException on multiple computers after being able to log in and use the API earlier today. I am able to successfully login using Google App passwords, but the error seems to occur during the initial sync.
Using Python 3.6.3 and gkeepapi-0.10.2:
import gkeepapi
keep = gkeepapi.Keep()
login_success = keep.login(my_username, my_app_password)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): android.clients.google.com
DEBUG:urllib3.connectionpool:https://android.clients.google.com:443 "POST /auth HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): android.clients.google.com
DEBUG:urllib3.connectionpool:https://android.clients.google.com:443 "POST /auth HTTP/1.1" 200 None
DEBUG:keep:Starting sync: None
DEBUG:keep:Syncing 0 labels and 0 nodes
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.googleapis.com
DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "POST /notes/v1/changes HTTP/1.1" 400 None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda3\lib\site-packages\gkeepapi\__init__.py", line 347, in login
self.sync()
File "C:\Anaconda3\lib\site-packages\gkeepapi\__init__.py", line 543, in sync
labels=[i.save() for i in self._labels.values()] if labels_updated else None,
File "C:\Anaconda3\lib\site-packages\gkeepapi\__init__.py", line 249, in changes
json=params
File "C:\Anaconda3\lib\site-packages\gkeepapi\__init__.py", line 173, in send
raise APIException(error['code'], error)
gkeepapi.APIException: {'errors': [{'domain': 'global', 'reason': 'invalid', 'message': 'Invalid Value'}], 'code': 400, 'message': 'Invalid Value'}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
gkeepapi.exception.LoginException: ('BadAuthentication', None)
I tried to run this code , it gives me the error above. I tried with the Gmail login and password, then with...
Read more >How to use the gkeepapi.exception function in gkeepapi | Snyk
To help you get started, we've selected a few gkeepapi.exception examples, based on popular ways it is used in public projects.
Read more >gkeepapi 0.13.6 documentation
Raises: APIException – If the server returns an error. LoginException – If login() has not been called.
Read more >Exception ApiException (2.20.1) - Java - Google Cloud
ApiException (String message, Throwable cause, StatusCode statusCode, boolean retryable) ... public class ApiException extends RuntimeException.
Read more >gkeepapi - Bountysource
Thank you for maintaining this library. I am trying to use gkeepapi to export my notes from Bear Notes and upload them to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the investigative work @aFrankLion @sentriz. I’ve pushed up a fix for the issue - let me know if it works for you.
I’ve been trying to debug this. It looks like the request made here https://github.com/kiwiz/gkeepapi/blob/master/gkeepapi/__init__.py#L246 needs some more keys, this is the minimum shape I could get away with
so removing any of
clientPlatform
,clientVersion
,clientTimestamp
, andclientLocale
would give the 400 we’re talking about. (they are not currently there) I have no idea how do add the likes ofclientSessionId
though