Reference
This document describes the common classes used by the Public Transit Directions API.
Common error codes
The following are the error codes that can occur in the Public Transit Directions API. When an error occurs, find the matching code entry to identify the cause.
Example response (when an unexpected server error occurs):
bash
{ "code": -1, "msg": "internal server error"}When a server error or a user input error occurs — rather than an ordinary search failure — the response is delivered in the JSON format shown above. For detailed error code information, see Troubleshooting.
| 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 |
Route search result codes
Details for result_code in the response body are as follows.
| Code | Message | Description |
|---|---|---|
| 0 | Success | Successfully retrieved directions |
| 1 | Route search failed | Unidentified error, or no line information to the destination |
| 2 | Cannot find the origin | Cannot find the departure station |
| 3 | Cannot find the destination | Cannot find the arrival station |
| 4 | Cannot find the waypoint | Cannot find the transit station |
| 202 | Invalid Parameter | There is an error in the request parameter values |
| 204 | No origin | No origin information in the request |
| 205 | No destination | No destination information in the request |
| 300 | Internal Server Error | Internal server error |
| 1001 | No line available to depart or arrive at the requested time | No line is in service at the time the user requested |