Google Calendar API Sample

February 23, 2014

Reading time ~1 minute

Developer Site

Client Repository

How to call Calendar API

Create Google App

  1. access Developer Console Site.
  2. click CREATE PROJECT button.
  3. click APIs & auth > APIs menu in left column.
  4. trun on Calendar API button.
  5. click Credential menu in left column.
  6. copy client ID in Client ID for web application section.

create app

Create HTML

load Javascript client. onload parameter is to set a callback method name which will be called when client is initialized.

<script src=""></script>


Following method is to auth. You can check about calendar auth information and auth method.

var config = {
	'client_id': clientId,
    'scope'    : '',
    'immediate': false
gapi.auth.authorize(config, $.proxy(this.handleAuthResult, this));

Get Calendar Information

Following method is to get calendar information. You can check about client method (gapi.client.calendar)

var config = {
        minAccessRole: 'owner'
    request = gapi.client.calendar.calendarList.list(config);

    console.log(res); // calendar informatino :)

My Sample Code

here! :)

add ticket number to git commit automatically

Most of ticket tracker like Github, pivotal tracker have function to connect your commit to ticket(story).But every time when you commit ...… Continue reading

I will build frontend and backend separately

Published on September 28, 2016

order of angular controller's initialisation

Published on October 05, 2015