How to generate an XOAUTH parameter using OAuth2.0 for use with Gmail IMAP protocol?
Asked Answered
P

1

6

I have a user authorized to access their gmail through imap using OAuth2.0. I have the OAuth2.0 access token (and refresh token). But I am having trouble figuring out how to map that into an XOAUTH parameter. All the documentation for generating the XOAUTH parameter are written assuming OAuth1.0.

I can follow the sample code make this work with OAuth1.0. But my server is using OAuth2.0 for other things and I want to use the same code.

Priapism answered 23/9, 2011 at 17:31 Comment(0)
V
5

From my Googling, I don't think it's currently possible to construct an XOAUTH param for IMAP using the OAuth2 access token. This is something Google really needs to add ASAP.

See http://groups.google.com/group/oauth2-dev/browse_thread/thread/c1235d5f21e7b438?pli=1

Valeric answered 28/12, 2011 at 18:19 Comment(1)
Just to update this information here. It is now possible to connect to Gmail IMAP via OAuth2: developers.google.com/google-apps/gmail/oauth_overviewMindy

© 2022 - 2024 — McMap. All rights reserved.