Pi’s Blog

My blog about Thunderbird and GSoC 2008

Online Tool for viewing Google Contacts


Since I finally got around to learning PHP, I decided to create a quick and simple online tool for viewing your Google Contacts.  It naturally supports the extra attributes that gContactSync uses (except allow remote content and preferred mail format since those aren’t too important).

My intention was just to make an easy way to view your synchronized Thunderbird/Google contacts from anywhere with Internet access with the ability to show the custom attributes added by gContactSync.  If you don’t use gContactSync you are better off using Gmail’s better-looking interface. 😉

It is read-only (you cannot update, delete, or add contacts or groups) for now.

I will put the source in CVS soon after I clean it up.  It reuses a lot of the JavaScript from gContactSync 0.2.


You can find it here.  Click on the Login button to be redirected to a page from Google.  If you are already signed into a Google Account then you can click on a button to grant access to your contacts for pirules.net (my website).

If you choose to grant access, a token is stored and matched with a cookie on your computer so you only have to sign in once.  This token can be used to access your contacts by retrieving, updating, adding, or deleting contacts and contact groups but your username and password cannot be obtained or modified using this token.  You can read more about this authentication method (called AuthSub) here.

You will be redirected back to pirules.net where the one-use token is exchanged with a multi-use token (still only for contacts).  Then, your groups and the first 25 contacts will be obtained.  Click on a group (left side) to show the contacts in it and click on a contact to view more details.  Everything is on the same page right now and contacts are obtained using AJAX so the entire page is not refreshed until you logout.

Only 25 contacts (for now) are shown at a time so there are links to the previous and next 25 contacts, if applicable, at the bottom of the list.

Click the Logout button when you are finished, which will de-activate your token unless you want it to remain valid for future use on the site. Logging out takes a few seconds before giving any feedback.

As a sidenote, if it doesn’t work try waiting for 10 or 15 minutes before letting me know because I am actively working on the page and sometimes make mistakes.  I just caught a nasty virus (which ruined my first day off), so I may be slow to reply.


  • JavaScript must be enabled for pirules.net
  • Cookies enabled for pirules.net (only needed until the page or browser is closed)
  • Firefox 3.0.6 or higher (tested with a fairly recent build of Shiretoko 3.1b3pre and Firefox 3.0.6).  It does not work in Internet Explorer 6, 7, or 8 right now, and it might not ever since I spend a lot of time at work making a website IE-compatible and it is neither fun nor easy.  I’m guessing anyone that uses this already uses Thunderbird and Firefox, but if that isn’t the case let me know and I’ll see what I can do.
  • It works on Safari (tested with my new iPod touch)

February 16, 2009 - Posted by | GSOC | ,


  1. hi, will you release the source for this? i’m interested in an application to sync pictures to blackberry phones and i’m a PHP programmer

    Comment by Hsilamot | March 29, 2009 | Reply

    • Sure, it is in my CVS repository – http://www.mozdev.org/source/browse/gcontactsync/online/

      Here‘s the newest version. It can’t update, delete, or add contacts but the backend for all that is already there from my extension.

      If you use CVS checkout online and src2. It is mostly written in JavaScript and the online directory has some PHP, although I plan to add another tool with more PHP for mobile browsers.

      cvs -d :pserver:guest@mozdev.org:/cvs login
      cvs -z3 -d :pserver:guest@mozdev.org:/cvs co gcontactsync/src2 gcontactsync/online

      The guest password is ‘guest’ without the quotes.

      Comment by pi | March 31, 2009 | Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: