Response codes
Response codes are divided into HTTP status codes, which indicate the status of a request, and error codes, which carry information about an error. When a request succeeds, HTTP status code 200 is returned along with the response body. When a request fails, an error code consisting of code and msg is returned.
HTTP status codes
An HTTP status code is a three-digit code that appears on the first line of a response message and indicates the status of the request (success or failure). Status codes fall into five broad classes, and the first digit of the code tells you the type of response. For details, see RFC 2616.
The following are the status codes returned for API requests and their meanings.
| Code | Status | Description |
|---|---|---|
| 200 OK | Success | The server successfully processed the client's request. The response body format varies by API. See the description of each API for details. |
| 400 Bad Request | Failure | General error The server detected a client error and could not process the request. Usually related to the required parameters of the API. |
| 401 Unauthorized | Failure | Authentication error (usually token-related) The request failed because the authentication credentials for the resource are not valid. |
| 403 Forbidden | Failure | Permission error The request reached the server but was rejected due to a permission issue. |
| 429 Too Many Request | Failure | Quota exceeded The assigned quota (usage) or the per-second request limit has been exceeded. |
| 500 Internal Server Error | Failure | System error (a general term for server-side errors) The server encountered an unexpected condition while processing the request. |
| 502 Bad Gateway | Failure | System error The gateway connecting different protocols connected an incorrect protocol, or there is a problem with the connected protocol, so communication is not working properly. |
| 503 Service Unavailable | Failure | Under maintenance The server is not ready to process the request. |
Error codes
The following are the error codes that can occur for each API product. When an error occurs, find the matching code entry to identify the cause.
| Code | HTTP status code | Description |
|---|---|---|
| -1 | 500 | An error occurred while processing inside the server. Resolution: Retry. |
| -2 | 400 | A required argument is missing, or the data type of a call argument is inappropriate or outside the allowed range. Resolution: Check the request parameters. |
| -3 | 403 | A feature required to use this API (such as simple signup, consent items, or service settings) is not enabled. Resolution: Select the required feature under App on Kakao Developers, set it to ON in the activation settings, and call again. |
| -4 | 403 | The account is restricted, or the account is performing a restricted action |
| -5 | 403 | No permission to request this API. Resolution: Complete the review process to obtain permission, then call again. |
| -7 | 500 | The service is under maintenance or has an internal problem |
| -8 | 400 | The request was made with an invalid header. Resolution: Check the request headers. |
| -9 | 400 | The API called has been discontinued |
| -10 | 400 | The allowed number of requests has been exceeded. Resolution: Check your allowed quota and adjust your calls to stay within it. See quotas and limits. |
| -401 | 401 | The request was made with an invalid app key or access token, or the registered app information does not match the app information in the call. Resolution: Check the app key or refresh the token, and check the app information registered on the developer site. |
| -602 | 400 | The maximum size was exceeded when uploading an image |
| -603 | 400 | A long-running operation, such as an image upload or scrape request, took too long to complete. |
| -903 | 400 | The request was made with an unregistered developer's app key, or with an access token composed of an unregistered developer's app key. |
| -911 | 400 | An unsupported image format was uploaded |
| -9798 | 503 | The service is under maintenance |