【问题标题】:Google Places Autocomplete auth inconsistency: "This API project is not authorized to use this API."Google Places Autocomplete 身份验证不一致:“此 API 项目无权使用此 API。”
【发布时间】:2016-07-15 01:14:52
【问题描述】:

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

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

【问题讨论】:

  • 请提供一个Minimal, Complete, Tested and Readable example 来证明这个问题。
  • @steven-harlow 我有同样的错误,我在不同的子域上使用相同的密钥..;一个有效,另一个没有……有任何进展吗?

标签: google-maps-api-3 google-places-api


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-02-22
    • 2019-03-03
    • 2019-05-21
    • 2016-10-29
    • 2018-05-29
    • 2014-04-13
    • 1970-01-01
    • 2018-08-04
    相关资源
    最近更新 更多