Skip to content

JavascriptDocumentation/GmailApi

Repository files navigation

GmailApi

API Overview

The Gmail API is a RESTful API that can be used to access Gmail mailboxes and send mail. The API supports many of the basic operations available through the Gmail user interface like reading, composing, and sending mail.

The Gmail RESTful API uses a JSON payload and provides five primary resource types:

  • Messages
  • Labels
  • Drafts
  • History
  • Threads

Messages

Messages are immutable: they can only be created and deleted. No message properties can be changed other than the labels applied to a given message.

History

History is a collection of recently modified messages in chronological order. While the history is intended as a lightweight method of synchronizing a client, it typically only contains records of changes within the past 30 days. Manual synchronization is required for clients that are out-of-date for more than 30 days.

Threads

Threads are collections of messages that represent a conversation. Like messages, threads may also have labels applied to them. However, unlike messages, threads cannot be created, only deleted. Messages can be inserted into a thread.

API Authorization and Scopes

Like other Google APIs, the Gmail API uses OAuth 2.0 to handle authentication and authorization which means you will have to generate client credentials in the Google Developers Console. Your app will also specify one or more scopes to gain access to various resources provided by the API.

Gmail API Scopes

List of most to least restrictive scopes:

Quick Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published