views:

614

answers:

3

The tool I'm developing would do a thing similar to when you join Facebook and they ask your GMail username and password and with it they can grab all your contacts.

But my tool doesn't use a browser, therefore it is difficult to get the proper headers. I assume that the Google application (Orkut) checks only my Cookies and Identity(ip, machine name, user-agent) as authentication method. In this case all I need is to get the proper cookies.

I tried to call https://www.google.com/accounts/ServiceLoginAuth?service=orkut with the parameters Passwd=realPasswordHere&[email protected] . But the response was a similar HTML with Set-Cookie: GALX=A9iBuq7y5xU;Path=/accounts;Secure

None of these cookies are the real thing. Have you tried it yourself? Do you know how to do it? Have you ever seen an open source project that does it?

+1  A: 

Consider using OAuth -- the URL I just gave details how to use OAuth to authorize the OpenSocial REST interface on Orkut, and this one has detailed specs on the RPC interface to OpenSocial, if that's what you prefer (the authorization part is basically the same, anyway).

Alex Martelli
+1  A: 

If you are just looking for the contacts check out the provided API: http://code.google.com/apis/contacts/

other google APIs

http://code.google.com/apis/gdata/

If you need source code to view how to do this you can check out the following project. http://sourceforge.net/projects/gccontactman/

hope that helps, and good luck!

YetAnotherDeveloper
A: 

Perhaps you could check the source code of a Google tool that does this:

http://mail.google.com/mail/help/email%5Fuploader.html

Jader Dias