Gmail API 總覽
Gmail API 是 RESTful API,可用於存取 Gmail 信箱和傳送郵件。對於大多數網頁應用程式而言,Gmail API 是授權存取使用者 Gmail 資料的最佳選擇,也適合用於各種應用程式,例如:
- 唯讀郵件擷取、索引和備份
- 自動或程式化訊息傳送
- 電子郵件帳戶遷移作業
- 電子郵件管理功能,包括篩選和排序郵件
- 在整個機構內標準化電子郵件簽名
以下列出 Gmail API 中常用的詞彙:
- 訊息
- 電子郵件訊息,包含寄件者、收件者、主旨和內文。訊息一旦建立,就無法變更。訊息由訊息資源代表。
- 執行緒
- 一組相關訊息,可組成對話。在電子郵件用戶端應用程式中,當一或多位收件者回覆郵件時,系統就會建立會話串。
- 標籤
用於整理訊息和討論串的機制。舉例來說,您可以建立「稅金」標籤,並套用至所有與使用者稅金相關的訊息和會話串。標籤分為兩種類型:
- 系統標籤
- 內部建立的標籤,例如
INBOX
、TRASH
或 SPAM
。這些標籤無法刪除或修改。不過,某些系統標籤 (例如 INBOX
) 可套用至郵件和會話串,也可以從中移除。 - 使用者標籤
- 使用者建立的標籤。使用者或應用程式可以刪除或修改這些標籤。使用者標籤由標籤資源代表。
- 草稿
未送出的訊息。草稿內含的訊息可以替換。傳送草稿時,系統會自動刪除草稿,並建立含有 SENT
系統標籤的郵件。草稿會以草稿資源表示。
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-21 (世界標準時間)。
[null,null,["上次更新時間:2024-12-21 (世界標準時間)。"],[[["The Gmail API is a RESTful API used to access Gmail mailboxes and send mail, suitable for tasks like reading, sending, and organizing emails."],["The API is not intended as a full email client replacement but is ideal for web applications needing authorized access to user data."],["Key terms include: Messages (individual emails), Threads (related messages), Labels (for organization), and Drafts (unsent messages)."],["Developers can find resources on authentication, authorization, and quickstart guides to begin using the Gmail API."]]],["The Gmail API, a RESTful API, enables authorized access to Gmail data for tasks like reading, indexing, backing up, sending, migrating, filtering, and standardizing email. It uses *messages*, *threads*, and *labels* (system or user-created) to organize emails. *Drafts* are unsent messages that, when sent, become messages. The API shouldn't replace IMAP for full email clients. To start using this API, users need to refer to the Get started as a Google Workspace developer guide and the quickstart overview.\n"]]