带有Bundle Identifier的iOS应用程序的API密钥限制

时间:2017-04-06 01:58:06

标签: google-api

调用https://servicecontrol.googleapis.com/v1/services/ {serviceName}时:检查,应该如何传递捆绑包标识符,以便可以为限制为捆绑包标识符的iOS应用程序验证API密钥?我作为consumerId传递"api_key:[my_key]",并尝试将包标识符作为用户代理,引用者,平台和服务代理(所有通过标签)传递。我为每次尝试都收到以下错误:

"checkErrors": [
{
"code": "CLIENT_APP_BLOCKED",
"detail": "Requests from this ios client application \u003cempty\u003e are blocked."
}
],

有没有办法传递捆绑包ID?

谢谢, 伊恩

2 个答案:

答案 0 :(得分:1)

捆绑包标识符通过servicecontrol.googleapis.com/ios_bundle_id操作标签传入。

我通过以下主题提供了此信息:https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/google-cloud-endpoints/I-u3sAUU3Ts。我已经对python端点管理代码进行了更改,如下面的pull请求所述:https://github.com/cloudendpoints/endpoints-management-python/pull/28

答案 1 :(得分:1)

需要使用您的包ID

设置

X-Ios-Bundle-Identifier标头