The following libraries and samples make it easy to get started using OAuth 2.0
authorization to access the Gmail IMAP and SMTP services.

## Java sample

JavaMail 1.5.2 or later
[natively supports OAuth for IMAP](https://javaee.github.io/javamail/OAuth2).
If you need to use an older version, or create your own implementation, see the
[Java sample code](https://github.com/google/gmail-oauth2-tools/wiki/JavaSampleCode).
To download the sample, refer to
[Tools and sample code for authenticating to Gmail with OAuth2](https://github.com/google/gmail-oauth2-tools).

## Python sample

- [Getting started](https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough)
- [Download](https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py)

## PHP sample

- [Getting started](https://github.com/google/gmail-oauth2-tools/wiki/PhpSampleCode)
- [Download](https://github.com/google/gmail-oauth2-tools/blob/master/php/oauth2.php)