Google maps api 3 Google放置自动完成身份验证不一致性:“;本API项目无权使用本API。”;

Google maps api 3 Google放置自动完成身份验证不一致性:“;本API项目无权使用本API。”;,google-maps-api-3,google-places-api,Google Maps Api 3,Google Places Api,我在我的应用程序中的两个位置使用Google Places Autocomplete API,但它共享相同的脚本和API密钥。在一个位置,places autocomplete工作正常,但在另一个位置,除了在网络选项卡中的“AutocompletionService.GetPredictions”请求中找到的返回值外,它会以静默方式失败: /**/_xdc_._6bvokq && _xdc_._6bvokq( [3, null, null,…] ) 0: 3 1: null 2:

我在我的应用程序中的两个位置使用Google Places Autocomplete API,但它共享相同的脚本和API密钥。在一个位置,places autocomplete工作正常,但在另一个位置,除了在网络选项卡中的“AutocompletionService.GetPredictions”请求中找到的返回值外,它会以静默方式失败:

/**/_xdc_._6bvokq && _xdc_._6bvokq( [3, null, null,…] )
0: 3
1: null
2: null
3: "This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/places_backend?project=_ For more information on authentication and Google Maps Javascript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key

我已经在我的google developer api控制台中“启用”了places web api和maps javascript api。

我也遇到过这个问题,并通过启用地理定位和地理编码web服务解决了这个问题。根据位置,也会查询这些数据。在api中启用这些服务之后,问题就为我解决了。希望同样的方法也适用于您。

请提供一个例子来说明这个问题。@steven harlow我也有同样的错误,我在不同的子域上使用了相同的密钥。。;一个有效,另一个无效。。。有进展吗?