Google's new Firefox Toolbar offers a URL shortening feature using http://goo.gl as the domain. Using Charles Proxy I looked into how the Toolbar gets gets these shortened URLs.
The Toolbar makes a POST request to http://goo.gl with 3 parameters: user, url, and auth_token.
Parameters
The Toolbar makes a POST request to http://goo.gl with 3 parameters: user, url, and auth_token.
Parameters
- user=toolbar@google.com
- Email address of service requesting shortened URL. I assume Feedburner would use feedburner@google.com.
- url=http://www.abc.net.au/news/stories/2009/12/15/2772467.htm
- URL being shortened.
- auth_token=793185282022
- Apparently not time based as a single URL would generate the same value for each request.
I glanced at the extensions javascript generating auth_token but I don't have time to completely figure it out right now.
Unfortunately goo.gl was having some issues as the requests were failing with 405 errors and "HTTP method POST is not supported by this URL" messages. I will work on it more once the Toolbar starts successfully requesting goo.gl URLs.
Update: I don't have to do the hard work. It has already been done for me.
Update: I don't have to do the hard work. It has already been done for me.
You could probably refer to this article and some links in the comments:
ReplyDeletehttp://www.kix.in/blog/2009/12/goo-gl/