본문 바로가기메인 메뉴 바로가기사이드 메뉴 바로가기

kakao developers

Related sites
  • Docs
  • Kakao Talk Message
  • REST API

사이드 메뉴

Kakao Map

Search

Kakao Talk Message

REST API

This document describes how to integrate Kakao Talk Message APIs into your service with a REST API.

You can test the features described in this document in [Tools] > [REST API Test].

Guide to Kakao Talk message sending feature

  • The Kakao Talk Message API supports sending messages only between users within the same service.
  • You must have permission to use the Kakao Talk Social API to use the feature to send messages to friends.
  • For details, see Message sending features and How to use.

Before you begin

Choose implementation method

According to your service's purpose and requirements, you need to decide which API to use first by considering their characteristics and difference.

1. Select message sending feature

Kakao Developers provides two types of message sending features: Kakao Talk Share and Kakao Talk Message. Select the feature to use by referring to Message sending features. If you want to use Kakao Talk Message, check the content after Step 2.

Scope of support

The REST API does not support Kakao Talk Share APIs. To apply the Kakao Talk Share feature on a web page, use the JavaScript SDK.

2. Select a message type and configuration method

Decide which message template to use by referring to Template types.

You can configure a message according to the default template in JSON format or create a custom template in person for your service. Refer to How to use for more details.

3. Select a target

Note that the Kakao Talk Message APIs are categorized according to the message targets:

TargetDescription
Send to meSends a message to the currently logged-in user's Kakao Talk "My Chatroom". This feature can only send messages to the currently logged-in user, not to other users.
Send to friendsSends a message to the currently logged-in user's Kakao Talk friends.
Important: Additional feature request is required.
You need to implement a process to get recipient information through Friends picker or Kakao Talk friends list retrieval API. You can send messages to up to 5 friends at once. There are daily and monthly quotas, so refer to quota.
Permission required to send messages to friends

If you want to send messages to friends, Request permission is required. See Usage Policy as well.

Send me message with default template

Basic information
MethodURLAuthorization
POSThttps://kapi.kakao.com/v2/api/talk/memo/default/sendAccess token
PermissionPrerequisiteKakao LoginUser consent
-Product Link
Activate Kakao Login
Manage consent items
RequiredRequired:
Send message in Kakao Talk (talk_message)

Sends a message to the user's My Chatroom using the predefined default template in JSON format.

Message template

A Message template is a form that configures messages to be sent in a predefined structure and format, and is broadly divided into Default template and Custom template. For details, see each document.

Send message to other users

You can send KakaoTalk messages to other users with the APIs below. Separate Permissions are required.

Request

Header
NameDescriptionRequired
AuthorizationAuthorization: Bearer ${ACCESS_TOKEN}
Access token as a type of user authentication.
O
Content-TypeContent-Type: application/x-www-form-urlencoded;charset=utf-8
Request data type
O
Body
NameTypeDescriptionRequired
template_objectObjectOne of Feed, List, Location, Commerce, Text, and Calendar messages.

Important: To use the calendar template, you need a public event ID or a subscribed calendar ID. To obtain permission for a public event or a subscribed calendar, request permission.
O

Response

Body
NameTypeDescriptionRequired
result_codeIntegerIf a message is successfully sent, 0 is returned.O

Sample

Request
curl -v -X POST "https://kapi.kakao.com/v2/api/talk/memo/default/send" \
-H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
--data-urlencode 'template_object={
"object_type": "feed",
"content": {
"title": "Dessert pictures",
"description": "Americano, bread, cake",
"image_url": "https://mud-kage.kakao.com/dn/NTmhS/btqfEUdFAUf/FjKzkZsnoeE4o19klTOVI1/openlink_640x640s.jpg",
"image_width": 640,
"image_height": 640,
"link": {
"web_url": "http://www.daum.net",
"mobile_web_url": "http://m.daum.net",
"android_execution_params": "contentId=100",
"ios_execution_params": "contentId=100"
}
},
"item_content": {
"profile_text": "Kakao",
"profile_image_url": "http://k.kakaocdn.net/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png",
"title_image_url": "http://k.kakaocdn.net/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png",
"title_image_text": "Cheese cake",
"title_image_category": "cake",
"items": [
{
"item": "cake1",
"item_op": "1000 won"
},
{
"item": "cake2",
"item_op": "2000 won"
},
{
"item": "cake3",
"item_op": "3000 won"
}
],
"sum": "total",
"sum_op": "6000 won"
},
"social": {
"like_count": 100,
"comment_count": 200,
"shared_count": 300,
"view_count": 400,
"subscriber_count": 500
},
"buttons": [
{
"title": "",
"link": {
"web_url": "http://www.daum.net",
"mobile_web_url": "http://m.daum.net"
}
},
{
"title": "View on App",
"link": {
"android_execution_params": "contentId=100",
"ios_execution_params": "contentId=100"
}
}
]
}'
Response
HTTP/1.1 200 OK
{
"result_code":0
}

Send me message with custom template

Basic information
MethodURLAuthorization
POSThttps://kapi.kakao.com/v2/api/talk/memo/sendAccess token
PermissionPrerequisiteKakao LoginUser consent
-Product Link
Activate Kakao Login
Manage consent items
Message template
RequiredRequired:
Send message in Kakao Talk (talk_message)

Sends a message to the user's My Chatroom using a custom template configured in [Tools] > [Message Template].

Message template

A Message template is a form that configures messages to be sent in a predefined structure and format, and is broadly divided into Default template and Custom template. For details, see each document.

Send message to other users

You can send KakaoTalk messages to other users with the APIs below. Separate Permissions are required.

Request

Header
NameDescriptionRequired
AuthorizationAuthorization: Bearer ${ACCESS_TOKEN}
Access token as a type of user authentication.
O
Body
NameTypeDescriptionRequired
template_idStringTemplate ID of the custom template registered in [Tools] > [Message Template Builder].O
template_argsObjectRequired when the message template specified by template_id uses user arguments.
Pass in key:value format.
Cannot overwrite the scrape result.

Important: If you do not use this parameter even though the custom template includes user arguments, the part specified as user arguments will be exposed in the message as ${KEY} format.
Important: When using user parameters in URL query parameters, apply Form URL Encoding (application/x-www-form-urlencoded) to the corresponding value.
X

Response

Body
NameTypeDescriptionRequired
result_codeIntegerIf a message is successfully sent, 0 is returned.O

Sample

Request
curl -v -X POST "https://kapi.kakao.com/v1/api/talk/memo/message/send" \
-H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-d "template_id=12345" \
-d 'template_args={"TITLE":"This is the title."}'
Response
HTTP/1.1 200 OK
{
"result_code":0
}

Send me scrape message

Basic information
MethodURLAuthorization
POSThttps://kapi.kakao.com/v2/api/talk/memo/scrap/sendAccess token
PermissionPrerequisiteKakao LoginUser consent
-Product Link
Activate Kakao Login
Manage consent items
RequiredRequired:
Send message in Kakao Talk (talk_message)

Sends a scrape message to the user's My Chatroom using information extracted from the specified web page URL.

Scrap eligible domains

The domain of the web page to be scraped must be registered in [App] > [Product Link Management] > [Web domain] on the app management page. For details, see Web domain.

Send message to other users

You can send KakaoTalk messages to other users with the APIs below. Separate Permissions are required.

Request

Header
NameDescriptionRequired
AuthorizationAuthorization: Bearer ${ACCESS_TOKEN}
Access token as a type of user authentication.
O
Body
NameTypeDescriptionRequired
request_urlStringWeb page URL to be scraped.
Its domain must match the [App] > [Product Link] > [Web domain] on the app management page.
Refer to Scrape message.
O
template_idStringTemplate ID of the message template configured in [Tools] > [Message Template].
Used when sending a scrape message based on a message template defined in your service.
(Note: Custom template)
X
template_argsObjectRequired when the message template specified by template_id uses user arguments.
Pass in key:value format.
Cannot overwrite the scrape result.

Important: If you do not use this parameter even though the custom template includes user arguments, the part specified as user arguments will be exposed in the message as ${KEY} format.
Important: When using user parameters in URL query parameters, apply Form URL Encoding (application/x-www-form-urlencoded) to the corresponding value.
X

Response

Body
NameTypeDescriptionRequired
result_codeIntegerIf a message is successfully sent, 0 is returned.O

Sample

Request: Using default template
curl -v -X POST "https://kapi.kakao.com/v2/api/talk/memo/scrap/send" \
-H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
--data-urlencode "request_url=https://developers.kakao.com"
Request: Using custom template
curl -v -X POST "https://kapi.kakao.com/v2/api/talk/memo/scrap/send" \
-H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
--data-urlencode "request_url=https://developers.kakao.com" \
-d "template_id=12345" \
-d 'template_args={"TITLE":"This is the title."}'
Response
HTTP/1.1 200 OK
{
"result_code":0
}

Send message with default template

Basic information
MethodURLAuthorization
POSThttps://kapi.kakao.com/v1/api/talk/friends/message/default/sendAccess token
PermissionPrerequisiteKakao LoginUser consent
Required:
Permission
Product Link
Activate Kakao Login
Manage consent items
RequiredRequired:
Send message in Kakao Talk (talk_message)

Sends a message composed in JSON according to the predefined default template format.

Message template

A Message template is a form that configures messages to be sent in a predefined structure and format, and is broadly divided into Default template and Custom template. For details, see each document.

Request

Header
NameDescriptionRequired
AuthorizationAuthorization: Bearer ${ACCESS_TOKEN}
Access token as a type of user authentication.
O
Content-TypeContent-Type: application/x-www-form-urlencoded;charset=utf-8
Request data type
O
Body
NameTypeDescriptionRequired
receiver_uuidsString[]uuid ​​obtained through the Friends picker or the Retrieving list of friends API.
Up to five uuids are allowed.
(Example: 'receiver_uuids=["abcdefg0001","abcdefg0002","abcdefg0003"]')
O
template_objectObjectObject containing the message components.
One of Feed, List, Location, Commerce, Text, and Calendar messages.

Important: To use the calendar template, you need a public event ID or a subscribed calendar ID. To obtain permission for a public event or a subscribed calendar, request permission.
O

Response

Body
NameTypeDescriptionRequired
successful_receiver_uuidsString[]Array of uuids that a message is successfully sent to.X
failure_infoFailureInfo[]Returned when you request to send a message to two or more (up to five) recipients and it fails to send some recipients with the HTTP status code 200.
If you request to send a message to a single recipient and it fails, only the error code and message are returned without failure_info.
X
FailureInfo
NameTypeDescriptionRequired
codeIntegerError code.O
msgStringError message.O
receiver_uuidsString[]Array containing uuids that are failed to receive a message.O

Sample

Request
curl -v -X POST "https://kapi.kakao.com/v1/api/talk/friends/message/default/send" \
-H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
--data-urlencode 'receiver_uuids=["abcdefg0001","abcdefg0002","abcdefg0003"]' \
--data-urlencode 'template_object={
"object_type": "feed",
"content": {
"title": "Dessert pictures",
"description": "Americano, bread, cake",
"image_url": "https://mud-kage.kakao.com/dn/NTmhS/btqfEUdFAUf/FjKzkZsnoeE4o19klTOVI1/openlink_640x640s.jpg",
"image_width": 640,
"image_height": 640,
"link": {
"web_url": "http://www.daum.net",
"mobile_web_url": "http://m.daum.net",
"android_execution_params": "contentId=100",
"ios_execution_params": "contentId=100"
}
},
"item_content": {
"profile_text": "Kakao",
"profile_image_url": "http://k.kakaocdn.net/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png",
"title_image_url": "http://k.kakaocdn.net/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png",
"title_image_text": "Cheese cake",
"title_image_category": "cake",
"items": [
{
"item": "cake1",
"item_op": "1000 won"
},
{
"item": "cake2",
"item_op": "2000 won"
},
{
"item": "cake3",
"item_op": "3000 won"
}
],
"sum": "total",
"sum_op": "6000 won"
},
"social": {
"like_count": 100,
"comment_count": 200,
"shared_count": 300,
"view_count": 400,
"subscriber_count": 500
},
"buttons": [
{
"title": "",
"link": {
"web_url": "http://www.daum.net",
"mobile_web_url": "http://m.daum.net"
}
},
{
"title": "View on App",
"link": {
"android_execution_params": "contentId=100",
"ios_execution_params": "contentId=100"
}
}
]
}'
Response: Success to send to all friends
HTTP/1.1 200 OK
{
"successful_receiver_uuids": ["abcdefg0001","abcdefg0002","abcdefg0003"]
}
Response: Fail to send a message to some friends
HTTP/1.1 200 OK
{
"successful_receiver_uuids": ["abcdefg0001","abcdefg0002"],
"failure_info":[{
"code": -532,
"msg": "daily message limit per sender has been exceeded.",
"receiver_uuids": ["abcdefg0003"]
}]
}

Send message with custom template

Basic information
MethodURLAuthorization
POSThttps://kapi.kakao.com/v1/api/talk/friends/message/sendAccess token
PermissionPrerequisiteKakao LoginUser consent
Required:
Permission
Product Link
Activate Kakao Login
Manage consent items
Message template
RequiredRequired:
Send message in Kakao Talk (talk_message)

Sends a message using a custom template configured in [Tools] > [Message Template].

Message template

A Message template is a form that configures messages to be sent in a predefined structure and format, and is broadly divided into Default template and Custom template. For details, see each document.

Request

Header
NameDescriptionRequired
AuthorizationAuthorization: Bearer ${ACCESS_TOKEN}
Access token as a type of user authentication.
O
Body
NameTypeDescriptionRequired
receiver_uuidsString[]uuid ​​obtained through the Friends picker or the Retrieving list of friends API.
Up to five uuids are allowed.
(Example: 'receiver_uuids=["abcdefg0001","abcdefg0002","abcdefg0003"]')
O
template_idStringTemplate ID of the custom template registered in [Tools] > [Message Template Builder].O
template_argsObjectRequired when the message template specified by template_id uses user arguments.
Pass in key:value format.
Cannot overwrite the scrape result.

Important: If you do not use this parameter even though the custom template includes user arguments, the part specified as user arguments will be exposed in the message as ${KEY} format.
Important: When using user parameters in URL query parameters, apply Form URL Encoding (application/x-www-form-urlencoded) to the corresponding value.
X

Response

Body
NameTypeDescriptionRequired
successful_receiver_uuidsString[]Array of uuids that a message is successfully sent to.X
failure_infoFailureInfo[]Returned when you request to send a message to two or more (up to five) recipients and it fails to send some recipients with the HTTP status code 200.
If you request to send a message to a single recipient and it fails, only the error code and message are returned without failure_info.
X
FailureInfo
NameTypeDescriptionRequired
codeIntegerError code.O
msgStringError message.O
receiver_uuidsString[]Array containing uuids that are failed to receive a message.O

Sample

Request
curl -v -X POST "https://kapi.kakao.com/v1/api/talk/friends/message/send" \
-H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
--data-urlencode 'receiver_uuids=["abcdefg0001","abcdefg0002","abcdefg0003"]' \
-d "template_id=12345" \
-d 'template_args={"TITLE":"This is the title."}'
Response: Success to send to all friends
HTTP/1.1 200 OK
{
"successful_receiver_uuids": ["abcdefg0001","abcdefg0002","abcdefg0003"]
}
Response: Fail to send a message to some friends
HTTP/1.1 200 OK
{
"successful_receiver_uuids": ["abcdefg0001","abcdefg0002"],
"failure_info":[{
"code": -532,
"msg": "daily message limit per sender has been exceeded.",
"receiver_uuids": ["abcdefg0003"]
}]
}

Send scrap message

Basic information
MethodURLAuthorization
POSThttps://kapi.kakao.com/v1/api/talk/friends/message/scrap/sendAccess token
PermissionPrerequisiteKakao LoginUser consent
Required:
Permission
Product Link
Activate Kakao Login
Manage consent items
RequiredRequired:
Send message in Kakao Talk (talk_message)

Sends a scrape message using information extracted from the specified web page URL.

Scrap eligible domains

The domain of the web page to be scraped must be registered in [App] > [Product Link Management] > [Web domain] on the app management page. For details, see Web domain.

Request

Header
NameDescriptionRequired
AuthorizationAuthorization: Bearer ${ACCESS_TOKEN}
Access token as a type of user authentication.
O
Body
NameTypeDescriptionRequired
receiver_uuidsString[]uuid ​​obtained through the Friends picker or the Retrieving list of friends API.
Up to five uuids are allowed.
(Example: 'receiver_uuids=["abcdefg0001","abcdefg0002","abcdefg0003"]')
O
request_urlStringWeb page URL to be scraped.
Its domain must match the [App] > [Product Link] > [Web domain] on the app management page.
Refer to Scrape message.
O
template_idStringTemplate ID of the message template configured in [Tools] > [Message Template].
Used when sending a scrape message based on a message template defined in your service.
(Note: Custom template)
X
template_argsObjectRequired when the message template specified by template_id uses user arguments.
Pass in key:value format.
Cannot overwrite the scrape result.

Important: If you do not use this parameter even though the custom template includes user arguments, the part specified as user arguments will be exposed in the message as ${KEY} format.
Important: When using user parameters in URL query parameters, apply Form URL Encoding (application/x-www-form-urlencoded) to the corresponding value.
X

Response

Body
NameTypeDescriptionRequired
successful_receiver_uuidsString[]Array of uuids that a message is successfully sent to.X
failure_infoFailureInfo[]Returned when you request to send a message to two or more (up to five) recipients and it fails to send some recipients with the HTTP status code 200.
If you request to send a message to a single recipient and it fails, only the error code and message are returned without failure_info.
X
FailureInfo
NameTypeDescriptionRequired
codeIntegerError code.O
msgStringError message.O
receiver_uuidsString[]Array containing uuids that are failed to receive a message.O

Sample

Request: Using default template
curl -v -X POST "https://kapi.kakao.com/v1/api/talk/friends/message/scrap/send" \
-H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
--data-urlencode 'receiver_uuids=["abcdefg0001","abcdefg0002","abcdefg0003"]' \
--data-urlencode "request_url=https://developers.kakao.com"
Request: Using custom template
curl -v -X POST "https://kapi.kakao.com/v1/api/talk/friends/message/scrap/send" \
-H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
--data-urlencode 'receiver_uuids=["abcdefg0001","abcdefg0002","abcdefg0003"]' \
--data-urlencode "request_url=https://developers.kakao.com" \
-d "template_id=12345" \
-d 'template_args={"TITLE":"This is the title."}'
Response: Success to send to all friends
HTTP/1.1 200 OK
{
"successful_receiver_uuids": ["abcdefg0001","abcdefg0002","abcdefg0003"]
}
Response: Fail to send a message to some friends
HTTP/1.1 200 OK
{
"successful_receiver_uuids": ["abcdefg0001","abcdefg0002"],
"failure_info":[{
"code": -532,
"msg": "daily message limit per sender has been exceeded.",
"receiver_uuids": ["abcdefg0003"]
}]
}

See more

Was this helpful?