我的Google-Places API密钥已激活但无效

时间:2018-03-08 00:17:17

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

我使用this package在Python上运行Google Places API。我正在运行以下代码:

from googleplaces import GooglePlaces, types, lang
key='XXXXXXX'
google_places = GooglePlaces(key)

query_result = google_places.nearby_search(
    location='London, England', keyword='Fish and Chips',
    radius=20000, types=[types.TYPE_FOOD])

print(query_result)

然而,当我这样做时,我收到了这个错误:

{
   "error_message" : "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/geocoding_backend?project=_",
   "results" : [],
   "status" : "REQUEST_DENIED"
}

然而,我的API已启用,一切看起来都很酷,如下所示:

enter image description here enter image description here enter image description here

有人可以帮忙吗?

0 个答案:

没有答案