Search code examples
gmailgoogle-appsgoogle-apps-marketplace

Access Google Apps Mail


I have to build an web-app for Google Apps market place where my app would enable Google Apps user to access and backup their Google Apps email to my server.

While I have a good knowledge with PHP and etc, with no prior knowledge to Google Apps development, I have been reading developers.google.com documentation since last couple of days and everything seems to start confusion with each-other now with SAML, Oauth2, OpenId, SSO etc, and Google Apps Mail and Gmail itself. So far, I have done helloworld app from the documentation that accesses the calendar and uses SSO for it.

I wish if you could point me to the right direction about how I should proceed to accessing the mail of the Google Apps user.


Solution

  • Since you wish to use the Google Apps Marketplace, you'll want to use 2-legged OAuth 1.0 with your application. OAuth 1.0 is officially deprecated but it's still the only supported authentication method to Google Accounts for the Marketplace.

    Instructions for authenticating to Gmail IMAP via 2-legged OAuth 1.0 are available at:

    https://developers.google.com/gmail/oauth_protocol