views:

410

answers:

3

I'm developing a PHP application to retrieve the list of contacts from a GMail account. I'm looking for a solution which would enable the user of my application to provide the login and password to their Gmail account in my application (as opposed to getting redirected to Google) and then automatically do the retrieval. The retrieval process can be run in PHP or JavaScript (which would then feed the list of contacts back to PHP using Ajax).

Is it possible to do that? Which JavaScript API should I use for that? Can someone point me at the right chapter in Google Contacts Data API documentation?

+1  A: 

This is really not advised - google provide OAuth for a reason - so that users won't have to give their credentials to 3'rd parties.

Check out http://code.google.com/apis/accounts/docs/OAuth.html

Speaking only for my self (and all other developers I know), having to hand over my credentials to 3'rd parties is a real no-no.

Sean Kinsey
Second this notion... I signed up with google for a reason, why would i want to give someone else my google credentials?
Chris
A: 

I haven't tested it myself but it looks nice: http://gmail-lite.sourceforge.net/wordpress/

OAuth is nice idea, but unfortunately probably not useful in this case, because as far as I know Google doesn't provide API for Gmail.

Maciek Sawicki
It does expose the contacts list: http://code.google.com/apis/contacts/
Sean Kinsey
A: 

google now provides oauth api for gmail, but i;m hunting examples of use... can anyone post or point me too? specifically i cannot find how to send emails from a users email address.

b

benjaminlotan
As far as I know, gmail doesn't give you access to this. Just send from a system-email and set the users address as the reply-to address.
Sean Kinsey
I really need the email to come from the users email address. I thought you could use smtp or IMAP with oauth authentication. If i can get in and read mail, shouldn't i be able to compose and send. I just cant get the details worked out.
benjaminlotan