I'm using Bitly currently to shorten links via HTTP request. I'd like to do the same through the Goo.gl service because it's free. I can't seem to find any documentation from Google on such a setup. Here's what I'm using with Bitly.
https://api-ssl.bitly.com/v3/shorten?access_token=MyApiToken&format=txt&longUrl=http://MyWebLink.com