Using oath2 to access gmail feed

1,614 views
Skip to first unread message

vinod deshmukh

unread,
May 19, 2011, 5:44:50 PM5/19/11
to oauth...@googlegroups.com
Hi,

I am using steps given at http://code.google.com/apis/accounts/docs/OAuth2.html#SS to access gmail feed. 
on last step when I am trying to hit url https://mail.google.com/mail/feed/atom/?oauth_token=xxxxxxxxx using curl, I am getting "Unauthorized" error.

Note: 
I have registered my application. 
In 1st step I am giving scope=https://mail.google.com/mail/feed/atom
I am getting proper json response with access_token, expires_in & refresh_token. But last step is not working.

Any help?

Regards
Vinod


Andrew Wansley

unread,
May 20, 2011, 12:43:38 PM5/20/11
to oauth...@googlegroups.com
Hi Vinod,

Gmail currently supports a special version of OAuth documented here:


Give that a shot, as Gmail doesn't currently support OAuth 2.0.

Andrew

Jayashree Biswas

unread,
May 24, 2011, 2:05:58 AM5/24/11
to oauth...@googlegroups.com
hi ,
 
We are trying to build a Gmail widget using IMAP and OAuth. Is there a way we can render the Google login / Grant access page as an iframe within our widget web application ? I am not able to find any standard way of doing this.
 
thanks !
Jayashree

Andrew Wansley

unread,
May 24, 2011, 2:12:57 AM5/24/11
to oauth...@googlegroups.com
Hi Jayashree,

We don't support iframing either page, due to the possibility of clickjacking.

Andrew

maxcan

unread,
Jun 9, 2012, 4:01:36 AM6/9/12
to oauth...@googlegroups.com
Since google has officially deprecated oauth1, when can we expect support for using oauth2 tokens to connect via IMAP?  The alternative, of asking users for their passwords and storing (even in encrypted form) is clearly suboptimal.

Max

On Monday, May 23, 2011 11:12:57 PM UTC-7, Andrew Wansley wrote:
Hi Jayashree,

We don't support iframing either page, due to the possibility of clickjacking.

Andrew

Adam Perkins

unread,
Jul 5, 2012, 8:38:24 PM7/5/12
to oauth2-dev
Does anyone have updates on this issue? Accessing IMAP using OAUTH2
tokens?

Thanks!!
Adam

On Jun 9, 3:01 am, maxcan <i...@cantor.mx> wrote:
> Since google has officially deprecated oauth1, when can we expect support
> for using oauth2 tokens to connect via IMAP?  The alternative, of asking
> users for their passwords and storing (even in encrypted form) is clearly
> suboptimal.
>
> Max
>
>
>
>
>
>
>
> On Monday, May 23, 2011 11:12:57 PM UTC-7, Andrew Wansley wrote:
>
> > Hi Jayashree,
>
> > We don't support iframing either page, due to the possibility of
> > clickjacking <http://en.wikipedia.org/wiki/Clickjacking>.

Nathan Broadbent

unread,
Jul 5, 2012, 11:54:07 PM7/5/12
to oauth...@googlegroups.com
Hi Andrew,

Does this mean that we must downgrade our app to use OAuth 1.0 if we need to connect to Gmail's IMAP server via XOAUTH?
If so, would you be able to provide a rough estimate of when IMAP might support OAuth 2.0 access tokens? 
We're already asking our users for the correct permissions, but it doesn't make sense to request the 'https://mail.google.com/' scope if we're not able to actually use it.


Cheers,
Nathan

Philip Nuzhnyy

unread,
Jul 13, 2012, 8:18:18 PM7/13/12
to oauth...@googlegroups.com
Slightly unrelated but does anyone know if XOAuth access token is reusable with other api services. Specifically, I am trying to get access to userinfo service (https://www.googleapis.com/oauth2/v2/userinfo) with the same access token used to access gmail with imap. I did include userinfo service in the scope parameter (and it gets displayed in the ouath dialog together with gmail) but subsequent attempts to access the service with the access token result in authentication error.      
Reply all
Reply to author
Forward
0 new messages