Gmail API, Google Opens Gmail To Developers
On Thursday at Google I/O, the Mountain View company made a huge announcement concerning Gmail. Google announced a new Gmail API. For years, the only way that developers have been able to access the huge amounts of data within Gmail was via IMAP. However, the only thing that IMAP was designed to do was to connect email clients to email servers. There was little room for app development in an IMAP framework.
For a while now, many of you have been asking for a better way to access data to build apps that integrate with Gmail. While IMAP is great at what it was designed for (connecting email clients to email servers in a standard way), it wasn’t really designed to do all of the cool things that you have been working on, which is why this week at Google I/O, we’re launching the beta of the new Gmail API.1
The new Gmail API opens up an unprecedented amount of features to developers. Further, the API gives developers a sort-of line item permissions request. The best way to explain this is to contrast the new API to IMAP. In an IMAP framework, developers are required to obtain permission to the whole of a user’s inbox. In contrast, “the new API gives fine-grained control to a user’s mailbox. For example, if your app only needs to send mail on behalf of a user and does not need to read mail, you can limit your permission request to send-only.”2 This opens up the ability to build out tons of new features. Google offers a broad overview of the new API and some possible features:
The Gmail API gives you flexible, RESTful access to the user’s inbox, with a natural interface to Threads, Messages, Labels, Drafts, and History. From the modern language of your choice, your app can use the API to add Gmail features like:
- Read messages from Gmail
- Send email messages
- Modify the labels applied to messages and threads
- Search for specific messages and threads3
Here is a video explaining the new Gmail API: