代码之家  ›  专栏  ›  技术社区  ›  Andromeda

拒绝Android客户端的方向API请求

  •  2
  • Andromeda  · 技术社区  · 6 年前

    https://maps.googleapis.com/maps/api/directions/json?mode=driving&transit_routing_preference=less_driving&origin=12.84938,77.6554783&destination=151,+9th+Main+Road,+HSR+Layout+Sector+6,+Bengaluru,+Karnataka+560102&key=MYAPI_KEY
    

    但是在测试端点时,我得到了一个错误:

    {
       "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address 223.227.127.66, with empty referer",
       "routes" : [],
       "status" : "REQUEST_DENIED"
    }
    

    我看过其他类似的问题 server key and browser key directions or maps api ?

    谢谢你的帮助。

    1 回复  |  直到 6 年前
        1
  •  0
  •   Navin Kumar    6 年前
    • 确保 应用程序限制为“无” 在显影剂中
    • Direction API需要IP限制,如果

    • 所以你需要中间服务器,然后你需要限制使用 服务器IP。。

    推荐文章