为gmail imap生成有效的oauth令牌和秘密? [英] Generating valid oauth token and secret for gmail imap?

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

问题描述

我一直在到处寻找 xoauth 的 Java 端口.py.因为我真的想在我的 java web 应用程序中使用相同的身份验证过程.

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.

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

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.

推荐答案

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

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

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

这是假设您要访问的服务是 gmail(因为您将问题标记为 gmail).如果您希望使用不同的服务(例如 Drive),那么您的起点是位于 https 的 api 控制台://code.google.com/apis/console

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天全站免登陆