Errors
Exact Geolocation error messages and what each one means.
This API currently always responds with an HTTP 200 status code, even for errors - always check the status field in the response body to determine success or failure, rather than the HTTP status code. The exceptions are a missing scope, which returns HTTP 403 with Access restricted, and a server-side error, which returns HTTP 500 with Internal server error (see below).
{
"status": "error",
"message": "error_message",
"balance": 0
}When the API encounters errors, it responds with one of the following exact error messages in the message field:
Token balance over; you have used up all your requests for todayInvalid tokenAccess restrictedNo slots availableInactive deviceWiFi access not enabledInvalid requestNo matches foundInternal server errorRate Limited Second
While the error messages listed above are the current ones returned by the API, we recommend programming defensively to handle potential additional error messages in the future. Always check the status field for error conditions and use the message field for specific error handling.
Error Details
| Error | Description |
|---|---|
Token balance over; you have used up all your requests for today | Daily request limit has been exceeded. Balance is reset at midnight UTC everyday (00:00 UTC), unless you are on a custom plan with a different reset schedule. You can also upgrade your plan for more requests. |
Invalid token | The API token is invalid or missing. Sign up at my.unwiredlabs.com to get a token. |
Access restricted | The access token does not have the geolocation:locate scope required by this endpoint. Grant it to the token on the User Dashboard. Returned with HTTP 403. |
No slots available | Device slot limit has been reached on your account. |
Inactive device | This device has been marked as inactive on your device plan. Contact support to activate it. |
WiFi access not enabled | WiFi positioning is not enabled for this account. Contact support for details. |
Invalid request | The request is malformed or contains invalid data. Check the help field for specific details. Common causes include malformed JSON, invalid data types, or invalid parameter values. |
No matches found | Unable to determine a location based on the provided data. This can occur when the cells, WiFi access points, or IP address sent in the request are not found in our database, or when location results failed validation checks (such as border threshold filtering). |
Internal server error | An internal server error occurred. This is a temporary issue on our side, please retry the request. |
Rate Limited Second | You have exceeded the per-second request limit allocated to your token. Reduce your request rate and retry. |

