bit.ly URL Reduction service suddenly not working

398 Views Asked by At

I am using cold fusion code to covert URL to bitly urls and just last week it stopped working. I have tried everything but it just will not work.

The original code below was working:

<cfhttp result="CFHTTP" method="GET" url="https://api-ssl.bitly.com/v3/shorten">
    <cfhttpparam type="formfield" name="access_token" value="#bitly_access_token#">
    <cfhttpparam type="formfield" name="longUrl" value="#URL.long_url#">
</cfhttp>

But now it is not and the cfhttp.filecontent is just returning "Connection Failure"

however when I put the same URL in a browser:

https://api-ssl.bitly.com/v3/shorten?access_token=ac46e2c56bd20dcaefe3f55be5ca&longUrl=http://www.url.com

it works. Any idea why this would be happening? Does anyone know if bit.ly changed anything?

Thank you!

1

There are 1 best solutions below

2
Adrian J. Moreno On

If you go to https://dev.bitly.com/index.html, there's a big notice stating

API V3 will be deactivated on March 1, 2020. If you are currently using V3, migrate to V4 as soon as possible to avoid a breakdown of your integrations. See all the changes in our updated documentation for API V4.

You've got 2.5 weeks to move to v4.