Write your First App: Getting Started

These instructions can help you create a small but functional client application using the Groups Settings API.

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.


Get a Google Account and enable the API

You need either a Google Workspace, Education, or ISP account for testing and configuration purposes. Once the account is created, verify your domain ownership. If you already have an account and have verified your domain ownership, then you're all set.

Become familiar with your Google Workspace Admin console found at https://admin.google.com/. For more information about the control panel, see Sign in to your Admin console.

Before you begin, you need to create your groups and group members, create a Google APIs Console, enable your API, and enable your Gmail and Google Groups services. For detailed information for each step, see API Prerequisites.

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?query string

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 Groups Settings API

The Groups Settings API operations map directly to REST HTTP verbs.

The specific formats for Groups Settings API URIs are:

https://www.googleapis.com/groups/v1/groups/group email address

The full set of URIs used for each supported operation in the API is summarized in the Groups Settings API Reference document

Learn about the JSON and Atom data formats

By default, the Groups Settings API returns data in JSON format. The Atom notation is an alternate data format. Both the JSON and Atom data formats support full read-write capabilities.

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.

To change the API's data format, include the alt query string in your request's URI. For example:

To return this data in the JSON format

GET https://www.googleapis.com/groups/v1/groups/salesgroup@example.com?alt=json

To return this data in the Atom format

GET https://www.googleapis.com/groups/v1/groups/salesgroup@example.com?alt=atom