Wednesday, January 29, 2020

Using the Bitly API with Google Apps Script (JavaScript)

To get started with version 4 of the Bitly api in Google Apps Script, ensure that you have a Bitly account with a username and password (not using the Facebook, Twitter, or Google login options).

Assuming that you are developing applications or scripts that will be used for a single account you don't need to worry about OAuth authentication, you can get a generic access token from this link.

If you haven't already, create a Google Apps Script. Here are some functions you can use:

https://gist.github.com/misterhay/38a500545ce7abc75b875f33f01c9f51


Hopefully that's enough to get you started. You can browse the rest of the Bitly API documentation for other functions.

3 comments:

Alex Friedman said...

You're a lifesaver! Just what I needed, thank you.

Unknown said...

Excellent work!

Mike Yeaton said...

Thanks - this was very helpful!