gspread に oauth クレデンシャルを使用させるにはどうすればよいですか? http 応答 gspread.httpsession.HTTPError でエラーが発生しました :( 私のコードの何が問題なのか教えてもらえますか?
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(),
"https://accounts.google.com/o/oauth2/token",
'user-agent'
)
gc = gspread.authorize(credentials)
wks = gc.open_by_key('1*****************W')
データベースからのデータが含まれる行はどこですか (Google oauth によって返されたアクセス トークンがあります)? んん