How do I make an authenticated request?


I currently have a Google script that returns the number of followers for a given username, but I’m frequently going over the 150 rate limit. How do I change my code so it makes an authenticated request?

I know very little about coding/APIs and I would really appreciate some help. Here is the code:

function twitterfollowers(pageid) {
var jsondata = UrlFetchApp.fetch(“”+pageid);
var object = Utilities.jsonParse(jsondata.getContentText());
return object.followers_count;


There’s a lot more you’ll need to do then some simple code changes as you can’t perform OAuth 1.0A securely from pure client-side Javascript. Take a look at [node:114] to get started on the topic…