How to get user's Gmail address after Authenticating?

9 views
Skip to first unread message

Grady Laksmono

unread,
Jul 2, 2009, 3:48:24 PM7/2/09
to Google Contacts API
Hello,
This is the first time I want to use Google Contacts API, and I'm
wondering on how can I get user's @gmail email address once they are
authenticate, such that I could send a GET request with user's @gmail
address and get their contacts?

http://code.google.com/apis/contacts/docs/3.0/developers_guide_protocol.html#retrieving_without_query

So, it says that I need to send this GET request: GET
http://www.google.com/m8/feeds/contacts/liz%40gmail.com/full

But, how can I get the user's @gmail address? Do I have to do it
myself? I see it that it doesn't make sense that user's must put their
email address first, and then ask them again to authenticate, which
itself is also inputting their @gmail address..

Thanks,
Grady

Julian (Google)

unread,
Jul 6, 2009, 10:18:24 AM7/6/09
to Google Contacts API
Hi Grady,

You can use the default user to avoid the need for the full email
address:
http://www.google.com/m8/feeds/contacts/default/full

Cheers,
Julian

On Jul 2, 8:48 pm, Grady Laksmono <gradyfau...@gmail.com> wrote:
> Hello,
> This is the first time I want to use Google Contacts API, and I'm
> wondering on how can I get user's @gmail email address once they are
> authenticate, such that I could send a GET request with user's @gmail
> address and get their contacts?
>
> http://code.google.com/apis/contacts/docs/3.0/developers_guide_protoc...
>
> So, it says that I need to send this GET request: GEThttp://www.google.com/m8/feeds/contacts/liz%40gmail.com/full

Grady Laksmono

unread,
Jul 6, 2009, 2:34:05 PM7/6/09
to Google Contacts API
Hi Julian,
Thanks for the reply. The problem now is that I'm using AJAX to load
my pages:

<?php include 'header.php' ?>
<script type="text/javascript">loadPage("thePage.php");</script>
<?php include 'footer.php' ?>

The problem is that if I direct the user to the Google's website, and
Google directs back the user to thePage.php, it will lose the header
and the footer.. Any solution to this? I also checked the application
of Tagged.com (http://i50.photobucket.com/albums/f322/Monyet88/
Untitled-1-1.jpg), the awesome thing about it is that it doesn't even
direct the user to the Google's page for authenticating.. the user
just have to put their username and password there.. which itself is
an iFrame, and i don't know how to make that works with Google
Contacts??

Thanks!
Reply all
Reply to author
Forward
0 new messages