在遷移到/ v1 Fusion Table API但沒有再等待的時候,遊戲已經到了最後。谷歌AppEngine到服務帳戶的Fusion Tables
我使用AppEngine上的Python,並試圖連接到與谷歌服務帳戶(OAuth2用戶對服務器端的應用程序更復雜的表妹使用JSON網絡令牌)
谷歌的Fusion Tables我發現指出了另一個問題我想了解一些使用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
沒有人有使用服務帳戶,他們可能可以共享連接到Fusion Tables AppEngine上的例子嗎?或者網上有什麼好的?
感謝
謝謝凱瑟琳。你會推薦帶有刷新令牌的OAuth2允許webapp進行無用戶訪問(在初始登錄後)嗎?希望允許cron作業更新表格。 – base2john
您至少可以授予對各個表的服務帳戶的訪問權限。不知道有關service.table()。列表()雖然。 – abeyer