> For the complete documentation index, see [llms.txt](https://ipforensics.gitbook.io/ipforensics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ipforensics.gitbook.io/ipforensics/protocols/error-codes.md).

# Error Codes

IpForensics uses conventional HTTP response codes to indicate the success or failure of an API request.

To ease debugging, quickly identify issues but also to facilitate programmatic handling, all errors include an IpForensics error code, a message that describes the problem, and a resolution field that gives guidance about how to fix the error.

| Error Code                     | HTTP Status | Description                                                                                                                                                                                                                               |
| ------------------------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| BAD\_REQUEST                   | 400         | You specified an invalid request payload.                                                                                                                                                                                                 |
| ACCOUNT\_TEMPORARILY\_DISABLED | 451         | Your API key is disabled. Your account have been temporarily restricted. Contact IpForensics support service: <https://ipforensics.net/contact-us>                                                                                        |
| UNAUTHORIZED\_IP               | 403         | IP filtering is enabled for the API key in use and the user request is from an IP that you did not whitelist.                                                                                                                             |
| UNAUTHORIZED\_ORIGIN/HOST      | 403         | Host/Origin filtering is enabled for the API key in use and the request origin is from a host/origin that does not match the ones you allowed.                                                                                            |
| SERVER\_ERROR                  | 500         | An unexpected error has occurred on IpForensics servers. Please check your request and retry again. [Contact us](https://ipforensics.net/contact-us) if the issue persists.                                                               |
| INSUFFICIENT\_TOKENS           | 402         | Insufficient token to initiate request. You need to buy some tokens to continue using the service. Goto <https://ipforensics.net/billing>                                                                                                 |
| INVALID\_API\_KEY              | 403         | Your API key is invalid. Make sure you are using the right key or check its value for a typo.                                                                                                                                             |
| INVALID\_IP\_ADDRESS           | 400         | The IP address that was searched is not a valid IPv4 or IPv6 address.                                                                                                                                                                     |
| RESERVED\_IP\_ADDRESS          | 400         | The IP address that was searched is a reserved address (loopback, link-local, multicast, private, site-local or wildcard IP address). Such IP addresses cannot be used to deduce geolocation information.                                 |
| LOCALHOST\_IP\_FORBIDDEN       | 403         | We were unable to get your client Ipaddress. This endpoint is not to be used with localhost or local environment as they do not have valid ip address. Consider using in a live/production environment. Contact us if the issue persists. |
