0
votes

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.

2

2 Answers

2
votes

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

0
votes

Seems like you are in the right place already - if you are going through the main developers.google.com documentation, that's where it should be.

I have had a look through their documentation, and found this though: Mail PHP API Overview

A quote from the above link/documentation:

App Engine applications can send email messages on behalf of the app's administrators, and on behalf of users with Google Accounts. Apps can receive email at various addresses. Apps send messages using the Mail service and receive messages in the form of HTTP requests initiated by App Engine and posted to the app.

More information:

EDIT

As I mentioned in the comments below, after further searching, I found this documentation for Google Data Apps APIs which should be helpful (the page currently 404s, but I've sent off a message to Google, so hopefully it should be fixed soon).

There is also a depreciated version of OAuth 1.0 that you could use to authenticate Gmail with IMAP/SMTP, using standard "three-legged" or non-standard "two-legged" OAuth.