问题描述
我到处搜索。因为我真的想在我的Java Web应用程序中使用相同的身份验证过程。
我尝试使用GoogleOAuthHelper生成令牌和秘密,但是当我将它们插入到,我收到错误信息,提示无效凭据。
您是否尝试了此页面上的链接
和
这是假设您要访问的服务是gmail(因为您标记了您的问题gmail )。如果您希望使用其他服务(例如云端硬盘),那么您的出发点是
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
andhttps://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标记和密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!