如何在谷歌应用程序引擎中调用REST API

我有2 GAE。 GAE1有REST API(Tastypie没有实现oauth认证)。 GAE2调用GAE1的REST API。

如果调用API:

data = urllib2.urlopen("http://___GAE1____.com/api_ws/api/v1/test/?format=json").read()

返回的结果是登录页面,而不是来自GAE1的JSON结果。

如何执行由GAE托管的身份验证? OAuth2或API密钥?

我阅读了https://developers.google.com/api-client-library/python/guide/aaa_oauth

但无法弄清楚什么是客户端的秘密,范围(我的REST API或一些谷歌云API?)

链接地址: http://www.djcxy.com/p/80061.html

上一篇: How to call REST API in google app engine

下一篇: Google AdSense API Refresh Token not working