Skip to main content

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

  1. Go to Google Calendar, https://calendar.google.com and make sure the "Reminder" calendar is marked.
  2. Open the "Network" tab of the Chrome Developer Tool and search for reminders / list
  3. 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

Release files for google-reminder-api-wrapper 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-reminder-api-wrapper 0.0.1
File Size Uploaded
google-reminder-api-wrapper-0.0.1.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for google-reminder-api-wrapper 0.0.1
File Interpreter ABI Platform
google_reminder_api_wrapper-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / google-reminder-api-wrapper-0.0.1.tar.gz

Download URL google-reminder-api-wrapper-0.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ff78bb2d2f3e1bfb0afbe24e427aff3a5cef881504e13b7a217941b41ba63ef7
BLAKE2b-256 checksum
How to use checksums
96a1637be40b5e657ff5aeaa46fab74439638006e3faad422967f751767701b6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / google_reminder_api_wrapper-0.0.1-py3-none-any.whl

Download URL google_reminder_api_wrapper-0.0.1-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ad367a86dfcdf2856031fcfbeb47c733d4e6152c027c2e02d0c43f0f1029e31
BLAKE2b-256 checksum
How to use checksums
4efa1fcbd7d2d734dd11017199b7e62b4cf440245d73a472805e02b534ab701f
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page