Generating valid oauth token and secret for gmail imap?

[亡魂溺海] 提交于 2019-12-04 04:36:36

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/12243629/generating-valid-oauth-token-and-secret-for-gmail-imap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!