为gmail imap生成有效的oauth标记和密码? [英] Generating valid oauth token and secret for gmail imap?

查看:119
本文介绍了为gmail imap生成有效的oauth标记和密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我到处搜索 xoauth的Java端口。 PY 。因为我真的想在我的Java Web应用程序中使用相同的身份验证过程。

我尝试使用GoogleOAuthHelper生成令牌和秘密,但是当我将它们插入到 google邮件java示例,我收到错误信息,提示无效凭据。



<如果有人能帮助,我会非常感激。

解决方案

您是否尝试了此页面上的链接 https://developers.google.com/google-apps/gmail/oauth_libraries




https://开发者。 google.com/google-apps/gmail/#oauth_access_to_imap_and_smtp



这是假设您要访问的服务是gmail(因为您标记了您的问题gmail )。如果您希望使用其他服务(例如云端硬盘),那么您的出发点是 https上的api控制台://code.google.com/apis/console


I have been searching everywhere for a Java port of xoauth.py. As I really want to use the same authentication process in my java web app.

I have tried using the GoogleOAuthHelper to generate the token and secret but when I plugin them in to the google mail java sample, I get errors back saying invalid credentials.

If anyone can help I would be very appreciative. I have been stuck on this for sooo long now.

解决方案

Have you tried the links on this page https://developers.google.com/google-apps/gmail/oauth_libraries

and https://developers.google.com/google-apps/gmail/#oauth_access_to_imap_and_smtp

This is assuming that the service you want to access is gmail (since you tagged your question gmail). If you're looking to use a different service, (say Drive) then your starting point is the api console at https://code.google.com/apis/console

这篇关于为gmail imap生成有效的oauth标记和密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆