简体   繁体   English

使用Oauth2 3腿访问Gmail的基本要求

[英]Basic Requirements for accessing Gmail with Oauth2 3 legged

What are the basic requirements (library) to access gmail using Oauth2 3 legged? 使用Oauth2 3腿访问gmail的基本要求(库)是什么?

Is there any java library supported for this access? 此访问是否支持任何Java库?

Any kickstart example using java? 任何使用Java的kickstart示例?

I found the example from google, but it seem like using python script to get access token. 我从google找到了示例 ,但似乎使用python脚本来获取访问令牌。 And I am getting confused. 我感到困惑。

Any inputs will be helpful. 任何输入都会有所帮助。

There are two high level steps to access the Gmail APIs using OAuth2: 使用OAuth2访问Gmail API有两个高级步骤:

  1. Obtain a user access token. 获取用户访问令牌。 To accomplish this, read this guide first, it contains the basic steps. 为此,请首先阅读本指南 ,其中包含基本步骤。 Then, checkout the Google OAuth2 Java client library , which has convenience classes that abstract away some of the low level protocol details. 然后,检出Google OAuth2 Java 客户端库 ,该具有便捷类,这些便捷类抽象出了一些底层协议的详细信息。

  2. Use the token to authenticate w/ Gmail IMAP/SMTP and start reading mails! 使用令牌通过Gmail IMAP / SMTP进行身份验证,然后开始阅读邮件! You already found out the relevant library in your link included in the question. 您已经在问题中包含的链接中找到了相关的库。

Use the token to authenticate w/ Gmail IMAP/SMTP and start reading mails! 使用令牌通过Gmail IMAP / SMTP进行身份验证,然后开始阅读邮件! You already found out the relevant library in your link included in the question. 您已经在问题中包含的链接中找到了相关的库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM