Google Apps Script Twitter oAuth Instructions

In my work regularly use the Twitter API with Google Spreadsheets/Sites. Usually I can fit the instructions into a custom dialog box, but for the occasions I can’t here are the instructions for getting a Twitter Consumer Key and Consumer Secret for oAuth access in Apps Script
  1. Register for an API key with Twitter at (if you’ve already registered a Google Spreadsheet/Twitter mashup you can reuse your existing Consumer Key/Consumer Secret). In the form these are the important bits:
    • Application Website = anything you like
    • Application Type = Browser
    • Callback URL =
  2. Once finished filling in the form and accepting Twitter’s terms and conditions you’ll see a summary page which includes a Consumer Key and Consumer Secret which you enter where prompted in Google Spreadsheet/Sites. Note: The default Twitter API setting is read-only. If you need write access this can be changed in the Settings tab
  3. When your Key and Secret are saved you need to open Tools > Script Editor … and Run the ‘authenticate/authorise’ function

Leave a Reply

Your email address will not be published.