Response Codes

Handling API Call Responses

  • For 200 response codes, you can always expect the response body documented on the API reference page. Only 200 response codes are guaranteed to return a response body as JSON.
  • For non-200 response codes please be aware of the following:
    1. A response body is not guaranteed to be returned.
    2. If there is a response body, its not guaranteed to be JSON.
    3. We currently return JSON with human readable debugging information, but the structure and content of this debugging information are subject to change. As an example...
      {
          "status": {
              "message": "Unauthorized",
              "status_code": 401,
          }
      }
      The contents of the status, message, and status_code are not guaranteed to always exist or remain constant for a given response code.
    4. Logic within your application should fail gracefully based the response code alone, and should not rely on the response body.

4xx Error Codes

The 4xx class of error codes is meant to indicate that the client failed to provide a valid request. Below are the most common 4xx class of error codes you might encounter when using the API.


400 (Bad Request)
This error indicates that there is a syntax error in the request and the request has therefore been denied. The client should not continue to make similar requests without modifying the syntax or the requests being made.

Common Reasons
  • A provided parameter is in the wrong format (e.g., a string instead of an integer).
  • A provided parameter is invalid (e.g., beginTime and startTime specify a time range that is too large).
  • A required parameter was not provided.

401 (Unauthoritzed)
This error indicates that the request being made did not contain the necessary authentication credentials (e.g., an API key) and therefore the client was denied access. The client should not continue to make similar requests without including an API key in the request.

Common Reasons
  • An API key has not been included in the request.

403 (Forbidden)
This error indicates that the server understood the request but refuses to authorize it. There is no distinction made between an invalid path or invalid authorization credentials (e.g., an API key). The client should not continue to make similar requests.

Common Reasons
  • An invalid API key was provided with the API request.
  • A blacklisted API key was provided with the API request.
  • The API request was for an incorrect or unsupported path.

404 (Not Found)
This error indicates that the server has not found a match for the API request being made. No indication is given whether the condition is temporary or permanent.

Common Reasons
  • The ID or name provided does not match any existing resource (e.g., there is no summoner matching the specified ID).
  • There are no resources that match the parameters specified.

415 (Unsupported Media Type)
This error indicates that the server is refusing to service the request because the body of the request is in a format that is not supported.

Common Reasons
  • The Content-Type header was not appropriately set.

429 (Rate Limit Exceeded)
This error indicates that the application has exhausted its maximum number of allotted API calls allowed for a given duration. If the client receives a Rate Limit Exceeded response the client should process this response and halt future API calls for the duration, in seconds, indicated by the Retry-After header. Applications that are in violation of this policy may have their access disabled to preserve the integrity of the API. Please refer to our Rate Limiting documentation for more information on determining if you have been rate limited and how to avoid it.

Common Reasons
  • Unregulated API calls. Check your API Call Graphs to monitor your Dev and Production API key activity.

5xx Error Codes

The 5xx class or error codes indicates that the server is aware it has errored or is incapable of performing the request. Below are the most common 5xx class of error codes you might encounter when using the API.


500 (Internal Server Error)
This error indicates an unexpected condition or exception which prevented the server from fulfilling an API request.


503 (Service Unavailable)
This error indicates the server is currently unavailable to handle requests because of an unknown reason. The Service Unavailable response implies a temporary condition which will be alleviated after some delay.