Common HTTP Status Codes and What They Mean
When an API responds, it sends a status code:
- 2xx (200, 201, 204) — Success. The request worked as intended.
- 400 — Bad Request. You sent something invalid (wrong format, missing required field, etc.). Check your request body and parameters.
- 401 — Unauthorized. Authentication failed. Check your API key or token.
- 403 — Forbidden. You're authenticated but don't have permission for this action.
- 404 — Not Found. The URL or resource doesn't exist. Check your endpoint and parameters.
- 429 — Too Many Requests. Rate limit exceeded. You've sent too many requests too fast. Wait before trying again.
- 500 — Server Error. The API service itself has a problem. It's not your fault. Try again later.
The HTTP module usually lets you see the status code and the response body, even on errors. Always check what the API returned — the error message in the response body often tells you exactly what went wrong.