Harper Reed's Blog

Harper Reed's Blog

Musing from a normal person doing normal things

05 Nov 2007

Google Contact Manager Hacking

Please note: This post was written some time ago (17 years ago). My perspectives, knowledge, and opinions may have evolved significantly since then. While the content might still offer valuable insights, I encourage readers to consider it in the context of its publication date.

Since Google just changed the game of mobile software - I got to thinking about my new fascination - Contact management. So the first place I go to is Gmail and Google’s new contact manager. Being an iSync freakout, I love syncing my contacts. I LOVE being able to bring in contacts from all my different sources and see them mix with my current contacts. I LOVE finding duplicates and merging then. God I am a dork. So recently, Google released a new contact manager into Gmail’s across the world (If you don’t have it, you probably will soon) - so I was excited to try out the import export pieces to see how well it works/goes. fun fun. here are most of my notes.

First off some history. So there is a pretty well documented “hole” in the old Google contact manager available in Google video. I say hole because some people claim its a security concern. It is. But I don’t think it is too big of concern. It requires a legit cookie and active session. I imagine through some reflection and other security nonsense - bad things could happen. But i am happy it is exposed.

If you go to:

http://mail.google.com/mail/contacts/ui/ContactManager? js=RAW&maximize=true&hide=true&position=absolute&hl=en&border=NONE
You will get a list of your contacts in XML. You can add various things onto the query string to change the output to js (out=js), change the sort order (psort=Email, psort=Name) and I am sure there are others as well.

So from here we move onto Gmail and the new contact manager. First off, you can easily find the new xml/js stream of your contacts:

http://mail.google.com/mail/contacts/data/contacts?show=ALL&out=js
This is (apparently) all your contacts. Take away the "&out=js" if you want to see the easier to read XML version.

So now the magic part of it all! Access to the raw Contact Manager. You do not have to physically in Gmail to access it. Just visit this easy to remember URL:

http://mail.google.com/mail/contacts/ui/ContactManager
You now have access to the new contact manager for Gmail (even if your Gmail account doesn't have access). You can also access this from a Google Apps account as well:
http://mail.google.com/a/nata2.org/contacts/ui/ContactManager?
Pretty easy!

From here you can handle all the goodness of importing and exporting your contacts to real formats. You can add real contact info. You can import from a bundle of different places and finally get your Gmail address book under control.

Sadly, there is not an “official” Gdata rest API for Google contacts, however with the recent announcements and with OpenSocial, I can’t imagine it being far behind.

Extra Credit: Here is a Gmail photo access trick from Jacob! Have you ever wondered how to access the photos stored? Well here is a trick:

http://mail.google.com/mail/photos/[email protected]
So the trick is to just append the email address to the url: http://mail.google.com/mail/photos/

So for me you get:

http://mail.google.com/a/nata2.org/photos/[email protected]
That is the picture of me for my Google Apps account. If you want it in Gmail go to:
http://mail.google.com/mail/photos/[email protected]
This is obvious a helper URL to easily get contact pictures in Gmail. You just replace the email address in the above URL with your own and you will get the picture. You could probably roll your own simple Gravatar like service using this info!