TextExpander: bit.ly with authentication

A quick script in response to Donald’s query on my TextExpander Experiments post. He wanted to know if I could make the bit.ly script which expands to a bit.ly-shortened version of a url in the clipboard work with an authenticated account, presumably for click tracking. Well, sure! Just adjust the script below to contain your bit.ly username and your API key (in lines 6 & 7), and replace the existing script in the TextExpander experiments bundle with this one (or create a new snippet with the script).


This is a companion discussion topic for the original entry at https://brettterpstra.com/2010/10/18/textexpander-bit-ly-with-authentication