1
2
3
4
5
6
7
8
9
10
11
12
import process from "node:process";
import { bitlyShortenLink } from "https://esm.town/v/galligan/bitlyShortenLink";
export let shortenLinkXMTP = async ({ long_url }) => {
// Call bitlyShortenLink with Bitly token, domain, and group GUID from secrets
return bitlyShortenLink({
long_url,
token: process.env.BITLY_ACCESS_TOKEN,
domain: process.env.BITLY_XMTP_DOMAIN,
group_guid: process.env.BITLY_XMTP_GROUP,
});
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023