Before you start creating your first client application using the Google Tasks API, there are a few things you need to do:
- Get a Google Account
- Get familiar with Google Tasks
- Register your project
- Learn about REST
- Learn about the JSON data format
Get a Google Account
You need a Google Account for testing purposes. If you already have a test account, then you're all set.
Try out Google Tasks
This API documentation assumes that you've used Google Tasks, and that you're familiar with web programming concepts and web data formats.
If you haven't used Google Tasks, then try out the user interface before starting to code.
Register your project
Before you can send requests to the Google Tasks API, you have to register your client with the Google APIs Console. You do this by creating a project—a named collection of settings and API access information—in the Console.
To register, visit the APIs Console. If you aren't already signed in, then sign in with your Google Account.
If you see a "Create project" button, click it to create a new project.
Select the Services pane, and activate the Google Tasks API. If the Terms of Service appear, read and accept them.
Now your project is created and your client is registered.
Registering with the Console provides you with an API key, which is a way to identify your client to Google. Later, when you're ready to add the API key to your client, you can return to the Console and visit the API Access pane. The API key is near the bottom of that pane, in the section titled "Simple API Access."
Learn about REST
There are two ways to invoke the API:
- Sending HTTP requests and parsing the responses.
- Using client libraries.
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
DELETE. It specifies a resource by a globally-unique URI of the following form:
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:
- Building Web Services the REST Way, which is aimed at service providers but provides a good overview of REST
- HTTP 1.1 method definitions; specification for
REST in the Google Tasks API
The Google Tasks API operations map directly to REST HTTP verbs.
The specific formats for Google Tasks API URIs are:
The full set of URIs used for each supported operation in the API is summarized in the Tasks API Reference document
Learn about the JSON data format
The Google Tasks APIreturns data in JSON format.