fwenzel / copy-shorturl

A Firefox extension to quickly create a short URL for the current page and copy it to the clipboard.
https://addons.mozilla.org/addon/copy-shorturl
Apache License 2.0
35 stars 15 forks source link

bit.ly API V4 #108

Closed HiggiML closed 4 years ago

HiggiML commented 4 years ago

I've received the following email several times from bit.ly re: updating to their V4 API.

"Dear Bitly Customer, Our records show your organization is still actively generating Bitly links using Bitly API V3 that is no longer supported as of March 1, 2020. You must complete your migration to API V4 no later than March 31 in order to avoid any disruptions to your work..."

It's not as simple as changing V3 to V4 in the Custom URL section of Copy ShortURL. https://api-ssl.bitly.com/v3/shorten?format=txt&access_token=[MyTokenHere]&longUrl=%URL%

How do I get the Copy ShortURL Add-On to use bit.ly's V4 API? Thanks a bunch!

fwenzel commented 4 years ago

Thank you! This is super helpful. I'll have to upgrade the API code, I have to check the documentation.

Thank you for saving me! I didn't know!!!

fwenzel commented 4 years ago

Okay I wrote the new code and tested it, it works. I will release version 5.1.0 shortly!

HiggiML commented 4 years ago

Yabba dabba doo! With your previous documentation, I was able to stumble through creating a bit.ly access token and using the custom url https://api-ssl.bitly.com/v3/shorten?format=txt&access_token=[MyTokenHere]&longUrl=%URL%. What do I need to tweak to use the new V4 API? Thanks!

fwenzel commented 4 years ago

This URL is for version 3 of the bitly API and will stop working next week.

To get back to normal:

Should work, it works for me:

image
HiggiML commented 4 years ago

Ah! Easy Peasy. Thank you.