I am fairly new to Apps Script and this is my first custom function using an API. Thankyou in advance for your advice. I have been following this code to integrate Bitly into Google Sheets. https://gist.github.com/misterhay/38a500545ce7abc75b875f33f01c9f51 The code they provide for ShortenBitly works perfectly, however I cannot get ExpandBitly or Stats functions to work. Below is my code for BitlyStats,