alexcr
November 12, 2023, 10:32am
1
In the following thread, @carycrusiau shares a way to accomplish link shortening via KM using the APIs for either Bitly or TinyURL.
Hi @alexcr !
I know Droplr but, apparently, they don't have an API that allows you to use their services from a command line.
Bit.ly has an API. So it's possible. Although a little more complex to implement than with TinyURL.
First, you need a Bit.ly account. Log in to your account and go to:
https://app.bitly.com/settings/api/
Enter your Bit.ly password and generate a token. Once you have your token, repeat the steps for my TinyURL solution and replace the shell script by:
Accesstoken=your…
I'd like to do the same, but using the service Droplr, whose API documentation can be found here...
https://droplr.github.io/docs/
I'm not at all adept at using APIs, so if anyone can offer guidance and assistance on modifying @carycrusiau 's scripts to use Droplr's API, I'd be grateful!
alexcr
November 29, 2023, 2:57am
2
Just want to drop a note here for others that a solution to this was figured out by @carycrusiau here...
[image]
But the method for recovering the token is freaking ridiculous
So now, in relation to the Bit.ly macro, we're going to replace the script with:
[image]
And the %JSONValue% by:
[image]
And… voilà !
Droplr Link.kmmacros (26.0 KB)
1 Like