2

I'm using the Google URL shortener service in Apps scripts to shorten very long Google Docs links when sending automated emails to our team. While building the script I ended up using 315 requests out of my quote of 1,000,000.

However, any calls I make to the URLShortener service now error out with "Rate Limit Exceeded" on the first and only request. When making multiple requests I sleep my script for 1 second to make sure I'm not flooding the service and go over my per-second rate limits.

How do I go about fixing this? I can't see any reason that it would notify me that I'm exceeding the rate limit.

function:

function ShortenURL(url)
{
  if(url != "")
  {
    var shortUrl = UrlShortener.Url.insert({
    longUrl:url
    });
    return shortUrl.id;
  }
  return "";
}
4
  • You could create another Google account and run the script under it.
    – user79865
    Nov 17 '15 at 2:59
  • Hi Normal, I let this sit since I posted and ran it again, no errors. I'm currently using an Apps account paid for by work, I could try my own if this happens again to see how it goes. Nov 17 '15 at 3:08
  • Looks like you're back within the rate limit, problem solved. With my free account I sometimes have to wait for a day to get the quota back...
    – user79865
    Nov 17 '15 at 3:10
  • 1
    I'm voting to close this question as off-topic because it's and old intermittent issue that should be reported following the directions on Google Apps Script Support
    – Rubén
    Jun 16 '18 at 16:17