You should get bit.ly token to use this API.
You can follow this instructions to obtain a token: https://support.bitly.com/hc/en-us/articles/230647907-How-do-I-generate-an-OAuth-access-token-for-the-Bitly-API-
git clone https://gist.github.com/2acc16a873e7467eefc44bcce353aa71.git
cd 2acc16a873e7467eefc44bcce353aa71