我找不到使用通过 GAE(可能是 Python)实现的经过身份验证的端点的 Android 应用程序(可能与 Android Studio)的小示例(或教程)。
Google 示例(问候语和井字游戏)在我的环境中似乎存在一些问题(令牌错误,未找到 404,......)。
谁能帮我?我要疯了...
先感谢您。
我找不到使用通过 GAE(可能是 Python)实现的经过身份验证的端点的 Android 应用程序(可能与 Android Studio)的小示例(或教程)。
Google 示例(问候语和井字游戏)在我的环境中似乎存在一些问题(令牌错误,未找到 404,......)。
谁能帮我?我要疯了...
先感谢您。
您是否能够从 localhost ( http://localhost:8080/_ah/api/explorer ) 上的 api Explorer 访问您的端点,您甚至可以在那里模拟身份验证。
如果 API 资源管理器正在工作,那么您需要检查在获取凭据时如何定义 SCOPE。
根据我的经验,我在以下方面遇到了问题: 1. 生成客户端 ID 2. 在 Endpoint API 中定义范围 3. 在 android App 中指定正确的范围 (server:client_id:123456789-abcdefghsadffwe.apps.googleusercontent.com";
我终于能够做到了。我使用了这 2 个谷歌示例:
在服务器端: https ://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-python
在客户端: https ://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-android
在我看来,此页面中的说明比官方的 google 文档要好。