Bit.ly API with ColdFusion / CFHTTP

Posted by: scoopseven 13 years, 1 month ago

Until Feb 23, 2011 I had been authenticating against the bit.ly API using the username/password properties on cfhttp. <cfhttp url="http://api.bit.ly/shorten?version=2.0.1&longUrl=www.longurl.com&apiKey=xxxxxxxx" username="myusername" password="mypassword"> </cfhttp> On Feb 23, this approach started failing this error message: {"errorCode": 500, "errorMessage": "MISSING_ARG_LOGIN", "results": null, "statusCode": ""} To fix, simply add the parameter login directly to the url for the API call, like this: <cfhttp url="http://api.bit.ly/shorten?version=2.0.1&longUrl=www.longurl.com&apiKey=xxxxxxxx&login=myusername"> </cfhttp> The password parameter isn't required as long as you're passing in the "apiKey" parameter. Thanks, bit.ly, for the heads up on this change. Not a word on their blog either.

Currently unrated


Recent Tweets

Recent Posts

Archive

2013
2012
2011
2010
2009
2008
2007
2006

Categories

Authors

Feeds

RSS / Atom