An unofficial API wrapper for the Google Reminder
Project description
API wrapper for Google Reminder
This is a work in progress to create an API wrapper for handling Google Reminders via code. Due to missing official documentation of the API, this should be considered unstable and not deployed to any production systems.
The current commands are implemented
- get
- list
- create
- delete
Not implemented commands
- update
Installing
Install the package with requirements by running
python3 setup.py install
Note that this package requires Python 3.
Usage
Following the instructions below on how to acquire the API session credentials and add them to your environment variables.
SID='xxxxxxxxxxxxxxxxx' HSID='xxxxxxxxxxxxxxxxx' SSID='xxxxxxxxxxxxxxxxx' APISID='xxxxxxxxxxxxxxxxx' SAPISID='xxxxxxxxxxxxxxxxx' authorization='xxxxxxxxxxxxxxxxx' key='xxxxxxxxxxxxxxxxx' python
from google_reminder_api_wrapper import ReminderApi
api = ReminderApi()
reminders = api.list()
print(reminders)
new_reminder = api.create('Test reminder', '2019-01-10 15:00')
reminders = api.list()
print(reminders)
api.delete(new_reminder)
reminders = api.list()
print(reminders)
Underlying Google Reminder API
Authorization
Currently, the Google session is still based on fixed cookies and authorization keys in the HTTP header.
SID = "xxxxxxxxxxxxxxxxx"
HSID = "xxxxxxxxxxxxxxxxx"
SSID = "xxxxxxxxxxxxxxxxx"
APISID = "xxxxxxxxxxxxxxxxx"
SAPISID = "xxxxxxxxxxxxxxxxx"
authorization = "xxxxxxxxxxxxxxxxx"
key = "xxxxxxxxxxxxxxxxx"
Note: The credential keys need to be set as environment variables for the requests to work. This is a work in progress and will in the future be integrated with the Google sessions API.
Finding Credentials
Credentials can be found by doing the following
- Go to Google Calendar, https://calendar.google.com and make sure the "Reminder" calendar is marked.
- Open the "Network" tab of the Chrome Developer Tool and search for
reminders / list
- In the "Header" sub-tab, find the required headers in the "Request Header"
Request Structure
The following is the main structure of the request sent to the Reminders API
https://reminders-pa.clients6.google.com/v1internalOP/reminders/<COMMAND>
.
where COMMAND is one of the following
- get
- list
- update
- create
- delete
Header
'x-origin': 'https://calendar.google.com',
'content-type': 'application/json',
'authorization': '<SESSION AUTHORIZATION>,'
'key': '<SESSION KEY>,'
'cookie': '<SESSION COOKIES>'
The Google Calendar is using this API with application/json+protobuf
in the data payload, but due to readability problems
this wrapper has reverse-engineered parts of the schema to normal JSON field names.
Backstory
Due to popular demand as seen in the following Google Issue Tracker thread, https://issuetracker.google.com/issues/36760283, I decided to give it a try. The wrapper is based on the following comment, https://issuetracker.google.com/issues/36760283#comment193.
The is based on the following comment, https://issuetracker.google.com/issues/36760283#comment193,
There is an undocumented API, which is used for example by Google Calendar. Maybe someone with the skills and time can write a user friendly wrapper or service for it ;-)
https://reminders-pa.clients6.google.com/v1internalOP/reminders/list?key=XXX
Commands are: list, get, create, update, delete
Some more details for "list" in Japanese: https://qiita.com/futa/items/c7a04c7b0be35508a626
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file google-reminder-api-wrapper-0.0.1.tar.gz
.
File metadata
- Download URL: google-reminder-api-wrapper-0.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff78bb2d2f3e1bfb0afbe24e427aff3a5cef881504e13b7a217941b41ba63ef7 |
|
MD5 | e9eaca0cab379e714fcb27b437c72e1e |
|
BLAKE2b-256 | 96a1637be40b5e657ff5aeaa46fab74439638006e3faad422967f751767701b6 |
File details
Details for the file google_reminder_api_wrapper-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: google_reminder_api_wrapper-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad367a86dfcdf2856031fcfbeb47c733d4e6152c027c2e02d0c43f0f1029e31 |
|
MD5 | 6f503cb0c6275630d7a02393ab0cb3d1 |
|
BLAKE2b-256 | 4efa1fcbd7d2d734dd11017199b7e62b4cf440245d73a472805e02b534ab701f |