copy-shorturl icon indicating copy to clipboard operation
copy-shorturl copied to clipboard

Update docs to reflect correct API key for bitly

Open snowbound opened this issue 7 years ago • 6 comments

I have used the older style API key and user account in various shortening apps over the years and it worked. I copied the API_Key that I have always used from my bit.ly account and pasted it into the extension and saved the settings.

I then spent 20 minutes wondering why I kept seeing capture

I gave up using the API_Key and had to to go through the OAuth token generation process and embedding the token into the https://api-ssl.bitly.com/v3/shorten?format=txt&access_token=&longUrl=%URL%

As mentioned in the documentation http://copy-shorturl.readthedocs.io/en/latest/serviceurl.html

snowbound avatar Oct 13 '17 18:10 snowbound

Good call that the old documentation might be out of date. I didn't update it when I turned the add-on into a webextension.

I'll also make sure to bubble errors into the console so at least you'll know what happened.

Side note: I am using bitly with an API key right now with no problems.

fwenzel avatar Oct 14 '17 05:10 fwenzel

Oh also, OAuth Token (the thing I am linking to in the copy shorturl prefs) is obviously what you need

fwenzel avatar Oct 14 '17 05:10 fwenzel

To confirm, did you generate a "generic access token" with bitly?

fwenzel avatar Oct 14 '17 05:10 fwenzel

Yes I originally started to create the Registered OAuth Application via the Bit.ly menu but realized that it seemed overly complicated for what I needed. That was when I discovered via bit.ly that a "generic access token" was more suitable. Perhaps the online documentation could indicated that?

snowbound avatar Oct 14 '17 14:10 snowbound

Yeah has little to do with more suitable -- the implementation I wrote is for what bitly calls "generic access token".

fwenzel avatar Oct 14 '17 22:10 fwenzel

I'll keep this Issue open to adjust the docs!

fwenzel avatar Oct 14 '17 22:10 fwenzel