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.
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.