Easy and compact access to my Google calendars


Google calendar data can be easily accessed from the local computer, without needing to navigate and logon to the online application. The magic words are Google API. No need for compiled programs. Making Google API calls from a simple HTML file gives us some advantages like:
  • View a simple list of our (possibly multiple) calendars.
  • View entries/events calendar by calendar.
  • Rapidly switch between different watch periods for each calendar, e.g. 7 records, 24 hours, a week, a month, a year ahead or all records.
  • No need to navigate online and logon, no passwords each time.
The code for a simple HTML file follows, being a simple forefront application for accessing Google calendar data. Of course, you need to have the usual Google API codes, to make secure Google API calls. So, the steps:
  1. Enable your Google Calendar API and get your client_id, client_secret and refresh_token. (You can follow the detailed explanations in the article 'Steps to make a Google API call'.)

  2. Copy the code below to a new HTML file, e.g. 'MyGoogleCalendars.htm'.

  3. Amend the file content and add above credentials - client_id, client_secret and refresh_token - in the 3 corresponding lines at the top of the script (MY_CLIENT_ID =, MY_CLIENT_SECRET =, MY_REFRESH_TOKEN =), within the quotes.

Save and open the file in a browser and make your selections using the range buttons for each calendar. Needless to mention that you need internet connection and javascript enabled in your browser.

Attn: You can keep the file on the local file system or on a hosted site, but you should in either case keep it strictly secret, for your explicit private access only - for viewing the file, viewing the source code and opening/executing the file, because it contains your private credentials!

The code is made simple and easy to understand. You could easily add further adaptations according to your preferences or restyle the presentation to your taste.

Have fun! Easy is effective.

Back to List