我正在尝试做我的地理定位python程序。我已经有了一个API密钥。我还启用了地理编码API,地图静态API,方向API,距离矩阵API,地理定位API,地点API,地图javascript API。
然而,我收到了这条消息:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<GeocodeResponse>
<status>REQUEST_DENIED</status>
<error_message>This API key is not authorized to use this service or API.</error_message>
</GeocodeResponse>
我想访问的链接:https://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=pentagon&key=MYKEY
我应该怎么做来解决这个错误?
发布于 2021-08-08 22:52:19
登录google开发人员控制台。
确保选择了要访问的项目。
在左侧的导航面板中,选择API and Services
在左侧的面板中,选择credentials。
在API Keys下,单击铅笔(编辑)图标。
向下滚动到API Restrictions并选择do not Restrictions key and save。
如果这不工作,您需要检查,以确保该项目是链接到一个帐单帐户,您将需要提供信用卡的这一部分。
https://stackoverflow.com/questions/66287534
复制相似问题