Google Launches Gmail API Beta

| by Sergio De Simone Follow 17 Followers on Jul 01, 2014. Estimated reading time: 1 minute |

At the last Google I/O Google has introduced a new Gmail API aimed at "giving developers flexible, RESTful access to the user's inbox, with a natural interface to Threads, Messages, Labels, Drafts, and History", and bringing developers multiple benefits over IMAP, says Google.

The objective of the Gmail API is not killing the IMAP protocol, as was initially misunderstood, but to make Gmail application development easier. As Google itself says, "the Gmail API should not be used to replace IMAP for full-fledged email client access."

The new Gmail API will not offer full access to Gmail inbox, as detailed on Google's blog, and will be restricted to:

  • Reading messages from Gmail.
  • Sending email messages.
  • Modifying the labels applied to messages and threads.
  • Searching for specific messages and threads.

The new API gives RESTful access to a user’s mailbox under OAuth 2.0 authorization and supports CRUD operations on true Gmail datatypes such as threads, messages, labels, drafts, and history. The API gives fine-grained control to a user’s mailbox, so that if an app only needs to send mail on behalf of a user and does not need to read mail, the app may be authorized through OAuth to only send mail. This is a benefit offered by the Gmail API in contrast to IMAP, which requires access to all of a user’s messages for all operations, as Eric DeFriez, of the Gmail Extensibility Team, remarks on Google's blog.

Another benefit of the Gmail API, continues DeFriez, comes from the API history feature, which allows to query the inbox change history. This will make it much easier to keep in sync the inbox "avoiding the need to do archaeology to figure out what changed."

The major benefit of the new API, though, is speed, according to DeFriez: "results from our tests and feedback from pre-release developers suggest that the new Gmail API is delivering dramatic performance improvements over IMAP for web application use cases."

Google provides client libraries for Gmail API for several languages, such as Java, JavaScript, .NET, Python, Objective-C, and PHP. Early-stage client libraries are also available for Go, Node.js, and Ruby.

Besides client libraries, Google also provides a quickstart guides in Java and Python.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you