So, looking at their API docs - http://dev.bitly.com/authen... - they specify that for the deprecated API key authentication method, you need two parameters: `login` and `apiKey` (not `access_token`).
Just trying to help. I trust that it's fully tested on your side, but I followed your instructions to the T and it didn't work.
I appreciate it, sorry for getting dickish about it. I've been using this script for a year and have never had an issue (and don't get that error message when I run it in debug). I'll test with your changes and if it works fine and prevents problems for others, I'll update.
Ok, first, the legacy API key shown changed to match the new requirements, but I had my old API key which didn't require a username and it was still functioning. I didn't realize no one could get those anymore. So you're correct, and an updated version of the script will be up shortly.
Are you saying you replaced your system ruby with an updated version? That's not a great idea, better off using rbenv or rvm to run multiple environments. The Service will always use the system Ruby, which on Mavericks should be 2.0 and 1.8.7 on earlier OS X versions. Thus, I'm running 2.0, but tested on 1.8.7 and 1.9 as well. Can't account for 2.1+.
Allow me to clarify: I did not replace the system Ruby -- I'm using RVM. Nothing in your script screams version problems, though, so based on what you discovered, disregard.
FWIW, in case people don't know about this option: you can also use TextExpander to easily create bit.ly links. They have an "Internet Productivity" snippets group available for download that includes "/bitly" as a snippet. Just copy a URL, type the snippet, and it will be replaced by a bit.ly link. I use it all the time.