Complete guide to status codes, error responses, and troubleshooting
Every Weather API request returns an HTTP status code in the response header. These codes indicate whether the request was successful or if an error occurred.
Code | Text | Description |
---|---|---|
200 | OK | Successful request and response. |
400 | Bad Request | Malformed parameters or other invalid input. |
401 | Unauthorized | Missing or invalid API key. |
403 | Forbidden | You don't have permission to access this resource. |
404 | Not Found | The requested resource doesn't exist. |
429 | Too Many Requests | You have exceeded your rate limit. |
500 | Internal Server Error | A problem occurred on the server. Retry later. |
To view status codes in the response header, add the -i
option to your curl
command:
When an error occurs, the response body is JSON with an error
object:
Learn about Rate Limiting and Thresholds to avoid hitting 429 errors.