OAuth 2.0 Biblioteki i przykłady
Poniższe biblioteki i próbki ułatwiają rozpoczęcie korzystania z autoryzacji OAuth 2.0 do uzyskiwania dostępu do usług IMAP i SMTP Gmaila.
Przykład w Javie
JavaMail w wersji 1.5.2 lub nowszej obsługuje natywny OAuth dla IMAP.
Jeśli chcesz użyć starszej wersji lub utworzyć własną implementację, zapoznaj się z przykładowym kodem Java.
Aby pobrać przykładowy kod, zapoznaj się z artykułem Narzędzia i przykładowy kod służące do uwierzytelniania w Gmailu za pomocą OAuth2.
Przykładowy kod w Pythonie
Przykład w PHP
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-12-22 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]