【发布时间】:2013-01-24 21:30:01
【问题描述】:
迁移到 /v1 Fusion Table API 的游戏迟到了,但不再拖延了。
我在 AppEngine 上使用 Python 并尝试使用 Google 服务帐户连接到 Google Fusion Tables(OAuth2 的更复杂的表亲,用于使用 JSON Web 令牌的服务器端应用程序)
我发现了另一个问题,该问题向我指出了一些有关将服务帐户与 Google 预测 API 结合使用的文档。 Fusion Table and Google Service Accounts
目前为止
import httplib2
from oauth2client.appengine import AppAssertionCredentials
from apiclient.discovery import build
credentials = AppAssertionCredentials(scope='https://www.googleapis.com/auth/fusiontables')
http = credentials.authorize(httplib2.Http(memcache)) #Http(memcache)
service = build("fusiontables", "v1", http=http)
# list the tables
tables = service.table().list().execute() # <-- ERROR 401 invalid credentials here
有没有人有使用他们可以共享的服务帐户连接到 AppEngine 上的 Fusion Tables 的示例?或者网上有什么好看的?
谢谢
【问题讨论】:
标签: python google-app-engine google-fusion-tables google-api-python-client