gpt4 book ai didi

android - 此 IP、站点或移动应用程序无权使用此 API key 。从 IP 地址收到的请求

转载 作者:行者123 更新时间:2023-11-29 20:09:58 25 4
gpt4 key购买 nike

我正在尝试使用以下 URL 在两个位置之间绘制路线

"https://maps.googleapis.com/maps/api/directions/json?" + params + androidKey;

其中 params 是起点和终点的纬度和经度,androidKey 是我使用 SHA 指纹从 Google 控制台收到的 Android key 。我已经启用了 Google Maps Android API、Google Places API for Android、Google Places API Web Service 等,但是当我尝试在我的手机上运行该应用程序时仍然收到以下响应

This IP, site or mobile application is not authorized to use this API key. Request received from IP address

我尝试使用导致以下响应的服务器 key

This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console

有人可以帮忙吗?谢谢

最佳答案

  1. 确保您已在 Google Api 控制台中启用 Google Maps Directions API
  2. 您必须使用您的Server_key

    例如:https://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&key=Server_key

只有在 google api 控制台中启用 API 后我才收到响应。

关于android - 此 IP、站点或移动应用程序无权使用此 API key 。从 IP 地址收到的请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35149518/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com