谷歌放置自动完成身份验证不一致:"This API project is not authorized to use this API."



我在应用中的两个位置使用 Google Places 自动完成 API,但它共享相同的脚本和API_KEY。 在一个位置,位置自动完成工作正常,但在另一个位置,除了在网络选项卡中的"AutocompleteService.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

我已经在我的谷歌开发者 API 控制台中"启用"了地方 web api 以及地图 javascript api。

我也遇到了这个问题,并通过启用地理位置和地理编码Web服务解决了它。根据位置的不同,还会查询这些内容。在 api 中启用这些服务后,问题为我解决了。希望同样适用于您。

相关内容

最新更新