ไลบรารีและตัวอย่าง OAuth 2.0
ไลบรารีและตัวอย่างต่อไปนี้ช่วยให้คุณเริ่มต้นใช้งานการให้สิทธิ์ OAuth 2.0 เพื่อเข้าถึงบริการ IMAP และ SMTP ของ Gmail ได้อย่างง่ายดาย
ตัวอย่าง Java
JavaMail 1.5.2 ขึ้นไปรองรับ OAuth สำหรับ IMAP โดยกำเนิด
หากต้องการใช้เวอร์ชันเก่าหรือสร้างการติดตั้งใช้งานของคุณเอง โปรดดูโค้ดตัวอย่าง Java
หากต้องการดาวน์โหลดตัวอย่าง โปรดดูหัวข้อเครื่องมือและโค้ดตัวอย่างสำหรับการตรวจสอบสิทธิ์เข้าสู่ระบบ Gmail ด้วย OAuth2
ตัวอย่าง Python
ตัวอย่าง PHP
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-12-22 UTC
[null,null,["อัปเดตล่าสุด 2024-12-22 UTC"],[[["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"]]