f = $.get('https://api-ssl.bit.ly/v3/shorten/?format=json&access_token=derpderpderp&longUrl=http%3A%2F%2Fgoogle.com%2F')
f.done(function(r){ console.log(r);});
Output:
Object
data: Array[0]
length: 0
__proto__: Array[0]
status_code: 500
status_txt: "UNKNOWN_ERROR"
__proto__: Object
What is this UNKNOWN_ERROR? Without any status_txt I have no way of knowing what went wrong. The longUrl is copied from their docs, so it shouldn’t be a URI encoding error.
In this case you can use your
&login=LOGIN&apiKey=KEYinstead of&access_token=TOKEN. Try http://bitly.com/a/your_api_key