gkeepapi
gkeepapi copied to clipboard
How to get master token
I am unable to get the master token as it does not show the sequences listed when I log in
Hi, It worked for me today using docker:
docker run --rm -it --entrypoint /bin/sh python:3.8 -c 'pip install gpsoauth; python3 -c '\''print(__import__("gpsoauth").exchange_token(input("Email: "), input("OAuth Token: "), input("Android ID: ")))'\'
To get the OAuth token, follow this steps : https://github.com/rukins/gpsoauth-java/blob/b74ebca999d0f5bd38a2eafe3c0d50be552f6385/README.md#second-way Leave Android ID blank
I was able to get it today using: https://github.com/leikoilja/ha-google-home?tab=readme-ov-file#master-token
got the master token from
I was able to get it today using: https://github.com/leikoilja/ha-google-home?tab=readme-ov-file#master-token
but still getting Bad Auth error , can anyone tell me what i might have been doing wrong , i even tried the method recommended by the docs by generating an app password but that didnt worked as well , any suggestions?
Traceback (most recent call last):
File "C:\Users\dell\keep to logseq\main.py", line 7, in <module>
success = keep.authenticate("[email protected]", master_token)
File "C:\Users\dell\AppData\Roaming\Python\Python313\site-packages\gkeepapi\__init__.py", line 746, in authenticate
auth.load(email, master_token, device_id)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dell\AppData\Roaming\Python\Python313\site-packages\gkeepapi\__init__.py", line 81, in load
self.refresh()
~~~~~~~~~~~~^^
File "C:\Users\dell\AppData\Roaming\Python\Python313\site-packages\gkeepapi\__init__.py", line 161, in refresh
raise exception.LoginException(res.get("Error"))
gkeepapi.exception.LoginException: BadAuthentication
@adrianlzt, were you able to successfully login using keep.authenticate()?
All I get is a BadAuthenticate error.
❯ uv run --with gkeepapi python -c 'import os; import gkeepapi; keep = gkeepapi.Keep(); keep.authenticate("[email protected]", os.environ["GKEEP_MASTER_TOKEN"]); keep.sync(); print(f"Total notes: {len(keep.all())}")'
Total notes: 743
@adrianlzt is there any way to determine what is it we are doing wrong , i have seen various ways of genrating master tokens here but all i get is bad auth
I followed the link I posted before. Nothing special. It just worked