Bug #1826290 “geoclue mozilla location api key rate limited” : Bugs : geoclue-2.0 package : Ubuntu

1 min read Original article ↗

I am using Ubuntu 19.04

geoclue version: 0.12.99-4ubuntu2
geoclue2 version: 2.5.2-1ubuntu1

The key used by geoclue in ubuntu to access the mozilla location service appears to be rate limited.

Here's the relevant lines in /etc/geoclue/geoclue.conf

# URL to the wifi geolocation service. The key can currenty be anything, just
# needs to be present but that is likely going to change in future.
url=https://location.services.mozilla.com/v1/geolocate?key=geoclue

The comment is wrong, using an invalid key gives a 400 error.

$ curl https://location.services.mozilla.com/v1/geolocate\?key=random_key
{"error":{"code":400,"message":"Missing or invalid API key.","errors":[{"domain":"usageLimits","message":"Missing or invalid API key.","reason":"keyInvalid"}]}}%

Using the current key gives a limit reached error

$ curl https://location.services.mozilla.com/v1/geolocate\?key=geoclue
{"error":{"code":403,"message":"You have exceeded your daily limit.","errors":[{"domain":"usageLimits","message":"You have exceeded your daily limit.","reason":"dailyLimitExceeded"}]}}%