Google Contacts API - No Redirection

Posted by mecablaze on Stack Overflow See other posts from Stack Overflow or by mecablaze
Published on 2010-03-16T22:44:23Z Indexed on 2010/03/16 22:51 UTC
Read the original article Hit count: 484

Hello there,

I am currently working on Contact Importer web app (in PHP) so I will be able to grab email address from a user's account on Gmail, Yahoo, etc and use them for my own evil purposes. Just kidding, my web app is very friendly.

I thought I would start with Google. I found they have a fantastic little API called Google Contacts API which lets a programmer, like myself, to access a user's contacts.

After a couple of hours of struggling and throwing shitty code together, I ran into a few road-blocks. My main question is this:

Is there any way that I can have a user provide their username and password for Gmail on my website and have my code retrieve the contacts without that nasty redirection to a Google login page? It's kind of ruins the whole flow of my web app.

I've looked into AuthSub, and gotten that to work, but of course the catch is that you have to redirect the user to obtain the access token. It looks like OAuth will have this same catch.

The one ray of hope I have is the ClientLogin method of authentication. Again, there is a catch, sometimes Google throws you a CAPTCHA instead of the auth token. Again, the user flow is ruined.

I've noticed that our good ol' friends over at Twitter have it working just fine. Does anyone know how they do it?

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about google-api