OAuth 2.0 库和示例
借助以下库和示例,您可以轻松开始使用 OAuth 2.0 授权来访问 Gmail IMAP 和 SMTP 服务。
Java 示例
JavaMail 1.5.2 或更高版本原生支持 IMAP 的 OAuth。如果您需要使用较低版本或创建自己的实现,请参阅 Java 示例代码。如需下载示例,请参阅使用 OAuth2 对 Gmail 进行身份验证的工具和示例代码。
Python 示例
PHP 示例
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-22。
[null,null,["最后更新时间 (UTC):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"]]