python - This API key is not authorized to use this service or API
问题描述
I am trying to do my Geolocation python program. I have already had an API key. I also enable geocoding API, Map static API, direction API, Distance matrix API, geolocation API, places API, map javascript API.
However, I received this message:
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>
the link I want to access: https://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=pentagon&key=MYKEY
What should I do to solve this error?
解决方案
登录谷歌开发者控制台。
确保选择了您要访问的项目。
在左侧的导航面板中选择 APIs and Services
在左侧的面板中选择凭据。
在 API Keys 下,单击铅笔(编辑)图标。
向下滚动到 API Restrictions 并选择不限制密钥并保存。
如果这不起作用,您需要检查以确保项目已链接到计费帐户,您需要为此部分提供信用卡。
推荐阅读
- c++ - c++ 中的 unique_ptr 行为
- excel - 将多个excel文件合并到一个工作簿中,并复制特定的行
- java - 用 AtomicReference 代替 ReadWriteLock 来进行非阻塞操作
- python-3.x - flask unittest - 制作没有循环的多夹具
- apache-zeppelin - 是否可以在不查看 Zeppelin 中的代码的情况下授予用户读取权限?
- javascript - Javascript onclick 函数从我第二次点击但不是第一次触发
- iis - ASP.NET MVC 项目 FTP 到 IIS 服务器
- javascript - Facebook 嵌入的加入群组按钮 - 重定向操作
- sql - 插入和更新触发器
- r - 加法与乘法内存使用错误分配?