Skip to main content

Frequently Asked Questions

My requests to the API use to work, but recently I started getting (403) UNAUTHORIZED responses, what is the cause?

This is most likely due to your API key being invalidated, there are several ways in which an API key could be invalidated:

  • The API Key was deleted in the web application
  • The user for who the API key was created has been deleted
  • The API integrations feature has been disabled on the user who created the API key.

To resolve the issue, log in to the web application and navigate to the API management section and ensure the expected API integration is still in the list of active API keys. If not, create a new API key, or get in touch with customer success for further assistance.

I am sending requests for measurement data using a valid ISO8601 string but get "invalid query parameter" errors

When sending requests for measurement data, the from and to request parameters are required. The API will accept any valid ISO 8601 formatted date string which may include an offset, for example 2024-02-15T12:00:00+02:00. Please note: when sending query parameters which include special characters such as the + symbol in this example case the client must URL encode the query parameter for it to be correctly decoded by the server.

In order for the example date string above to be correctly sent to the server, it must be URL encoded to 2024-02-15T12%3A00%3A00%2B02%3A00 before sending the request.

More information on URL Encoding query parameters when request data from REST APIs is available at: https://locationiq.com/glossary/url-encoding

When I request measurement data for a specific time period it works, but if I increase the size of the time period I get (400) INVALID_REQUEST_PARAMETERS responses, why does this happen?

This is proably due to the limits enforced on the aggregation level for you query. In order to prevent too much measurement data being requested in a single query, queries must specify a larger aggregation level as they request data for a larger period of time. Please see the Key Concepts page for more information on the aggregation level requirements for the different endpoints

When I request measurement data from a site, I only get data for some of the assets at the site in the response, why is that?

When querying measurement data for a site that has many assets, there is too much data to return in a single response. The API will paginate the result and only send data for the first page of assets in the response, the client can then keep requesting for additional pages until all the data has been fetched. Please see the Key Concepts section for more details, and the Export Measurements Guide for code examples.