REQUEST_DENIED to Google Directions API

问题描述 投票:2回答:2

我从Google Direction API获得响应后,试图在MKMapView上绘制路线。我正在尝试此操作,因为Apple服务器未返回印度位置的方向结果,并且我发现有人在堆栈溢出时遇到相同的问题。我试图这样做[]

    NSString *url = @"https://maps.googleapis.com/maps/api/directions/json?origin=Gurgaon&destination=Noida&key=XXXXXXXXXXXXX&sensor=true";

但是我的反应不佳

{
"error_message" = "This IP, site or mobile application is not authorized to use this API key.";
routes =     (
);
status = "REQUEST_DENIED";

}

我仔细检查了我使用的捆绑软件ID是否与我在为Google API创建iOS密钥时提供的ID匹配。任何人都知道我缺少什么。

我从Google Direction API获得响应后,试图在MKMapView上绘制路线。我正在尝试此操作,因为Apple服务器未返回印度位置的导航结果,并且我发现...

ios ios7 google-maps-api-3 google-direction
2个回答
0
投票

我正在从Android方面弄清楚这一点。您的API密钥与您注册的软件包不匹配。您是否可能尝试使用旧的API密钥?


0
投票

[Google Directions APIGoogle Places API似乎不支持具有iOS或Android限制的键。我已经在Google Places API的“常见问题解答”中找到了此内容:

© www.soinside.com 2019 - 2024. All rights reserved.