mercredi 1 octobre 2014

python gspread authorize oauth2 credentials


Vote count:

0




How can i make gspread use my oauth credentials? I having error for http response :( can anyone tell me what's wrong with my code?



import datetime
import gspread
import json
import MySQLdb
from oauth2client.client import OAuth2Credentials


# Get access token from database
data = json.loads(row['access_token'])
credentials = OAuth2Credentials(
data['access_token'],
"1*************************k.apps.googleusercontent.com",
"9t*****************W",
data['refresh_token'],
datetime.datetime.now(),
"http://ift.tt/IlrJjr",
'user-agent'
)

gc = gspread.authorize(credentials)
wks = gc.open_by_key('1*****************W')


Where row contains data from database (It has access token returned by google oauth)? m(_ _)m



asked 44 secs ago







python gspread authorize oauth2 credentials

Aucun commentaire:

Enregistrer un commentaire