Monday, July 20, 2009

Viewing Google Login via Fiddler

I started playing around with the Google Data APIs.  I'm amazed at how easy the .NET library is to consume.  In a few minutes I had their samples connecting to Google Photo,and in about an hour I had connected to my Google Contacts and viewed all my contacts.

I wanted to know how this was working.  Firing up WireShark there was too much going on, so I tried Fiddler which worked well. It also has a cool Request Builder feature that I'm going to dive into.

Launch Fiddler and click the Request Builder tab.  From the drop down list on the left select Post.  Type in https://www.google.com/accounts/ClientLogin in the textbox, and HTTP/1.0 in the next drop down.  In the Request Headers put Content-type: application/x-www-form-urlencoded.  In the request body put accountType=GOOGLE&Email=YOUREMAIL@gmail.com&Passwd=YOURPASSWORD&service=cl

Click the Execute button.  You should get back a result 200.  Click the TextView in the Response area of Fiddler.  This lets you see the all important Auth token :)

Go here to learn about Google API authentication: http://code.google.com/apis/gdata/auth.html#ClientLogin

No comments: