如何让 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 返回的访问令牌)?毫米