Using Google APIs

Flexible, RESTful access to Gmail features

With the Gmail API, gone are the days of using raw sockets to talk to Internet email protocols. The API’s higher-level functionality lets developers access drafts, labels, folders, and of course messages, but also provide admin capabilities such as mass user migration.

API overview
Read and send messages, manage drafts and attachments, search threads and messages, work with labels, setup push notifications, and manage Gmail settings.

Note: The Gmail API should not be used to replace IMAP for full-fledged email client access. Instead, see IMAP and SMTP.

The Gmail API is a web service: it uses a RESTful API with a JSON payload.
Like other Google REST APIs, the Gmail API uses OAuth 2.0 to handle authentication and authorization.