페이지 이동경로
  • Docs>
  • Getting started>
  • REST API

Getting started

REST API

This document describes how to leverage the Kakao APIs using a REST API and provides a list of recommended settings in Kakao developers when using the REST API.

Overview

You can implement most Kakao APIs using a REST API in your service server, except for Kakao Link or some plugin features related to service UI. You can also use the Kakao APIs not supported by Kakao SDK through a REST API.

REST API is available in any environment where HTTP request is possible. It is used to send requests from a client to a server or from a server to another server.

You can use a REST API in the following environments:

  • Mobile or PC web environment
  • Mobile environment such as iOS or Android
  • Web server in various environments such as Java, Ruby, or Python

REST API test tool

Kakao Developers provides a REST API test tool that allows you to test when developing with a REST API or debugging.

Test with curl

You can also test a REST API on your device using curl. If you use macOS, you do not need to install it separately since curl is built-in on macOS. On Windows, however, you must download curl for a test since it is not installed by default.

You can easily execute a test to request an API and check its response with this REST API test tool. The tool screen consists of as follows:

Composition of REST API test tool

🅐 API List: Select one of the APIs you want to test. 🅑 App information: Shows the test app to send a REST API request to. You can select another test app by clicking the list icon next to the app name ('developers-sample' in here, set as a default.) 🅒 API information: Describes the features that the currently selected API provides. 🅓 Authentication: Select what to use between an access token or your app's Admin key in the request header for authentication. To use an access token, click [Issue token], and then you can get an access token for your test app immediately under your Kakao Account currently logged in. 🅔 Query string: Set the request parameter values to be transmitted when requesting a test. You can see the description and format of each parameter in 'Request' under 'Specification'. To try sending a request as you specified, click [Send].

Specifications in REST API test tool

🅕Specification > Request: Describes the request parameters of the selected API. 🅖Specification > Response: Describes the keys and values in response to the API request.

Response example in REST API test tool

🅗Response example: Shows the examples of the response for success and failure cases.


When you click [Send] in 🅔Query string, the response and request code sample are displayed under 'Response' as you specify in 🅓'Authentication' and 🅔'Query string'.

Response and request example in REST API test tool

🅘HTTP status code: Shows the HTTP status code in response to the API request. To see more about the HTTP status code in the response, refer to Reference Information > REST API reference > Response code. 🅙Response body: Shows the response body in response to the API request. 🅚Response code example: You can copy the Request code example and paste in Command or Terminal for a test.

Sample

You can implement a REST API request and response with various programming languages. Here are the examples you can refer to for each language:

I cannot find the sample of the language I use.

For reference or samples of other languages ​​and frameworks not provided in this documentation, search it or ask us in Devtalk.

Security: Allowed IP address

You can set to allow the only requests called from the registered IP addresses to prevent security incidents such as app key leakage.

To use this feature,

  1. Go to [My Application] > [Allowed IP address].
  2. Click [Register allowed IP address].
  3. Enter your service server's IP addresses to be allowed and click [Save].
How to register allowed IP address

The set IP addresses support IP(IPv4, IPv6), CIDR(IP/CIDR), and Subnet Mask(IP/Mask) and are applied to all Kakao API calls. To register multiple IP addresses, separate them with line breaks.

To disable this feature, delete all registered IP addresses by clicking [Delete].

IMPORTANT

After you register any IP address, you can call the Kakao APIs only from the registered IP address with a REST API key or Admin key. If you call from the unregistered IP address, the following error is returned. To solve this issue, register the IP address of the server that you send a request from, or disable this feature.

"msg": "ip mismatched! callerIp=XXX.XXX.XXX.XXX. check out registered ips.", "code": -401