BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Google Launches Gmail API Beta

by Sergio De Simone on Jul 01, 2014 |

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.

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

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT