Skip to content

Instantly share code, notes, and snippets.

@jheasly
Created December 20, 2014 02:06
Show Gist options
  • Save jheasly/ddd2628e0be6771c28ac to your computer and use it in GitHub Desktop.
Save jheasly/ddd2628e0be6771c28ac to your computer and use it in GitHub Desktop.
Attempt to connect to Tarbell Google spreadsheet
# -*- coding: utf-8 -*-
import getpass
import httplib2
import gspread
from apiclient import discovery
from oauth2client import keyring_storage
'''
Almost entirely cribbed from tarbell/oauth.py
'''
storage = keyring_storage.Storage('tarbell', getpass.getuser())
credentials = storage.get()
gc = gspread.authorize(credentials)
sh = gc.open_by_key('[spreadsheet-key-goes-here]')
@jheasly
Copy link
Author

jheasly commented Dec 20, 2014

The above throws this error:

raise HTTPError(response)
gspread.httpsession.HTTPError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment