OAuth 2.0 程式庫與範例
下列程式庫和範例可讓您輕鬆開始使用 OAuth 2.0 授權,存取 Gmail IMAP 和 SMTP 服務。
Java 範例
JavaMail 1.5.2 以上版本原生支援 IMAP 的 OAuth。如果您需要使用舊版或自行建立實作項目,請參閱 Java 程式碼範例。如要下載範例,請參閱「使用 OAuth2 驗證 Gmail 的工具和範例程式碼」。
Python 範例
PHP 範例
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-22 (世界標準時間)。
[null,null,["上次更新時間:2024-12-22 (世界標準時間)。"],[[["This page provides libraries and samples to facilitate using OAuth 2.0 authorization for accessing Gmail IMAP and SMTP services."],["Sample code and tools are available for Java, Python, and PHP to help developers integrate OAuth 2.0 into their applications."],["JavaMail 1.5.2 and later natively support OAuth for IMAP, while older versions can utilize the provided Java sample code."],["Python and PHP developers can find getting started guides and downloadable samples for seamless OAuth 2.0 integration with Gmail."]]],["OAuth 2.0 authorization for Gmail IMAP and SMTP services is facilitated through provided libraries and samples. Java users with JavaMail 1.5.2+ have native OAuth support; older versions or custom implementations can use linked sample code. Python and PHP users can access \"Getting Started\" guides and download sample code via provided links. The tools for all three can be found in the linked Gmail OAuth2 repository.\n"]]