Google Apps Mail

Apr 6, 2011 at 4:21 PM

Trying to connect to Google Apps Mail and it looks like from your code you need to receive a verification code.

1. How would you run this in the background job. I have no browser or any type of UI.

2. I'm assuming the url for the scope needs to change as well for google apps mail.

 

Any insight is appreciated.

Coordinator
Apr 6, 2011 at 5:02 PM

For now you should try to enforce a LOGIN authentication I believe all other clients do the same.

If you need to connect using XOAUTH then there are 2 ways in doing so, the 3L and the 2L way.

Inside the documentation I postet the 3L way which requires a browser and user input.

The 2L way is similar to a regular username/password authentication, but you will need to register your application with google where you will receive an application identification code.

Using this code you can skip the browser stuff and shorten the authentication procedure. With this code Google can identify the client (your application) thus identifying the access as a trusted one.

All scope and parameters are listed here http://code.google.com/apis/gdata/faq.html#AuthScopes

The 2L(two-legged) way is described here http://code.google.com/apis/gdata/docs/auth/oauth.html#2LeggedOAuth

This is Java article but the principles is the same.

Apr 6, 2011 at 5:14 PM
Edited Apr 6, 2011 at 7:06 PM

Any way you can also post a 2L sample as that would be great and pretty common. Thanks in advance

Coordinator
Apr 7, 2011 at 8:37 AM

If I find some time to spare I will post an example.