Google Apps Platform

Write your First App: Prerequisites

These instructions can help you create a small but functional client application using the Google Calendar API. You'll need a Google Account for testing purposes. If you already have a test account with a project registered in the Google Developers Console, then you're all set; you can visit the Google Calendar user interface to set up, edit, or view your test data.

There are two ways to invoke the API:

  • Using REST directly.
  • Using client libraries.

Before you can start coding, there are a few things you need to do.

Contents

Get a Google Account

You need a Google Account for testing purposes. If you already have a test account, then you're all set.

Get familiar with Google Calendar

This API documentation assumes that you've used Google Calendar, and that you're familiar with web programming concepts and web data formats.

If you haven't used Google Calendar, then try out the user interface before starting to code.

Get familiar with Google Developers Console

If you haven't already registered your application with the Google Developers Console, then set up a project and application in the Developers Console. The system guides you through the process of choosing or creating a project and registering a new application, and it automatically activates the API for you.

If you've already registered your application with the Developers Console, then follow this procedure instead:

  1. Go to the Google Developers Console.
  2. Select a project.
  3. In the sidebar on the left, select APIs & auth. In the displayed list of APIs, make sure the Google Calendar API status is set to ON.
  4. In the sidebar on the left, select Credentials.

In either case, you end up on the application's credentials page.

Learn about REST

There are two ways to invoke the API:

If you decide not to use client libraries, you'll need to understand the basics of REST.

REST is a style of software architecture that provides a convenient and consistent approach to requesting and modifying data.

The term REST is short for "Representational State Transfer." In the context of Google APIs, it refers to using HTTP verbs to retrieve and modify representations of data stored by Google.

In a RESTful system, resources are stored in a data store; a client sends a request that the server perform a particular action (such as creating, retrieving, updating, or deleting a resource), and the server performs the action and sends a response, often in the form of a representation of the specified resource.

In Google's RESTful APIs, the client specifies an action using an HTTP verb such as POST, GET, PUT, or DELETE. It specifies a resource by a globally-unique URI of the following form:

https://www.googleapis.com/apiName/apiVersion/resourcePath?parameters

Because all API resources have unique HTTP-accessible URIs, REST enables data caching and is optimized to work with the web's distributed infrastructure.

For more information about REST, you may find the following third-party documents useful:

REST in the Google Calendar API

The Google Calendar API operations map directly to REST HTTP verbs.

The specific formats for Google Calendar API URIs are:

https://www.googleapis.com/calendar/v3/users/me/calendarList?parameters
https://www.googleapis.com/calendar/v3/calendars/calendarID/events/eventID?parameters

The full set of URIs used for each supported operation in the API is summarized in the Google Calendar API Reference document.

Learn about the JSON data format

The Google Calendar API returns data in JSON format.

JSON (JavaScript Object Notation) is a common Internet format that provides a simple method of representing arbitrary data structures. According to json.org, JSON is a text format that is completely language-independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.