【发布时间】:2016-03-21 18:42:19
【问题描述】:
我想通过 Google+ API 使用服务器端通信来检索当前用户的个人资料信息。我根据python的谷歌示例登录用户:
credentials = client.credentials_from_clientsecrets_and_code(
CLIENT_SECRET_FILE,
['https://www.googleapis.com/auth/drive.appdata', 'profile', 'email'],
code)
然后我调用 Google+ API:
http_auth = credentials.authorize(httplib2.Http())
service = build('plus', 'v1', http = http_auth)
google_request = service.people().list(userId = 'me', collection = 'visible')
result = google_request.execute()
这会引发以下错误:
HttpAccessTokenRefreshError: invalid_grant
有人知道我能做些什么吗?
【问题讨论】:
标签: python google-api google-authentication