Google API错误OVER_QUERY_LIMIT&空的仪表板 [英] Google API Error OVER_QUERY_LIMIT & Empty Dashboard

查看:161
本文介绍了Google API错误OVER_QUERY_LIMIT&空的仪表板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调用Google的距离矩阵API时,我收到了OVER_QUERY_LIMIT错误。



启用结算后,它不应该显示此错误,因为我可以每天发出100,000个请求每个API文档。尽管目前我每天的请求量是2500-2600个。

另外,Google Console项目中的API统计报告不会显示Distance Matrix API中的任何数据仪表板,但是,它显示其他API的数据。参见附件 {origin}& destinations = {destination}& sensor = false& Key = {api_key }



正确: https://maps.googleapis.com/maps/api/distancematrix/json?&origins= {原点}&安培;目的地= {目的地}&安培;关键= {} API_KEY



虽然我仍然不确定为什么当我从本地计算机拨打电话但不在生产服务器上时,不正确的URL工作原因。


  1. 关于使用情况统计信息,只要我更新了API URL,它就开始在仪表板中显示API。


I'm receiving OVER_QUERY_LIMIT error intermittently when calling Google's Distance Matrix API.

After enabling billing it should not show this error since I could make 100,000 requests/day as per API documentation. Though, I'm making on 2500-2600 requests/day currently.

Also, API statistics report in Google Console project doesn't show any data for Distance Matrix API in the dashboard, however, it shows data for other APIs. See attached screenshot.

Error Message:

{
    "destination_addresses": [],
    "error_message": "You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=_",
    "origin_addresses": [],
    "rows": [],
    "status": "OVER_QUERY_LIMIT"
}

解决方案

Thanks, @DaImTo & @Prisoner for looking into this.

It seems an issue is in Google's internal system. I resolved an issue with a tricky way. Here are my findings I would like to share so people can save time I wasted in debugging an issue.

  • The error that Google provides("OVER_QUERY_LIMIT") is something that misguides people. I just made few changes in API URL and it's working on.
  • Changed "HTTP" to "HTTPS"
  • Previously I was using "Key" and changed it to "key"

Incorrect : http://maps.googleapis.com/maps/api/distancematrix/json?&origins={origin}&destinations={destination}&sensor=false&Key={api_key}

Correct: https://maps.googleapis.com/maps/api/distancematrix/json?&origins={origin}&destinations={destination}&key={api_key}

Though, I'm still not sure why incorrect URL is working when I make a call from local machine but not on production server.

  1. Regarding usage statistics, it started showing API in dashboards as soon as I updated API URL.

这篇关于Google API错误OVER_QUERY_LIMIT&空的仪表板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆