Google App Engine Python经过身份验证的终结点和Android

时间:2015-06-16 07:32:07

标签: google-app-engine oauth-2.0 google-cloud-endpoints google-app-engine-python android-authenticator

我无法找到使用通过GAE(可能是Python)实现的Authenticated Endpoints的Android应用程序(可能使用Android Studio)的小示例(或教程)。

Google示例(Greetings和Tic Tac Toe)似乎在我的环境中存在一些问题(令牌错误,404找不到,.....)。

任何人都可以帮助我吗?我疯了......

提前谢谢。

2 个答案:

答案 0 :(得分:0)

您是否能够从localhost(http://localhost:8080/_ah/api/explorer)上的api Explorer访问您的Endpoint,您甚至可以在那里模拟身份验证。

如果API资源管理器正在运行,那么您需要检查在获取凭据时如何定义SCOPE。

根据我的经验,我在以下方面遇到了问题: 1.生成客户端ID 2.在Endpoint API中定义范围 3.在Android App中指定正确的范围(server:client_id:123456789-abcdefghsadffwe.apps.googleusercontent.com“;

答案 1 :(得分:0)

我终于能够做到了。 我使用了这2个谷歌示例:

在服务器端: https://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-python

在客户端: https://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-android

在我看来,此页面中的说明比官方的Google文档更好。