사이드 메뉴
Getting started
Kakao Developers
Login
Communication
Advertisement
- Concepts
- Ad creation: Ad account
- Ad creation: Campaign
- Ad creation: Ad group
- Targeting for ad group
- Custom audience targeting for ad group
- Ad creation: Creative common
- Ad creation: Display creative
- Ad creation: Message creative
- Ad creation: Personalized message creative
- Bizboard landing settings
- Report
- Message management
- Personalized message management
- Message ad management
- Message ad operation
- Ad View management
- Business Form linkage management
- Pixel & SDK linkage management
- Audience management
- Engagement targeting management
- Customer file management
- Friend group management
- Ad account management
- Reference
- Type information
- Error code
JavaScript
This document describes how to integrate Kakao Talk Message APIs into your service with the Kakao SDK for JavaScript ("JavaScript SDK").
You can test the features described in this document in [Tools] > [JS SDK demo] menu.
- 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.
You need to select which API to call based on the type of message to send and the configuration method. Follow the steps below to select the API to use before development.
1. Select message sending feature
Kakao Developers provides two types of message sending features: Kakao Talk Share and Kakao Talk Message. Refer to Message sending features to select the feature to use. If you want to use Kakao Talk Message, perform the following steps.
The JavaScript SDK does not support Kakao Talk Message API in built-in function form. To use Kakao Talk Message API with JavaScript SDK on a web page, use the Kakao.API.request function to make a request to the same URL as the REST API.
2. Select message type and configuration method
Refer to Template types to decide which message template to use.
You can configure messages to send using default templates based on predefined templates in object form, or custom templates configured directly for your service. Refer to Configuration method comparison.
3. Select message target
Note that for Kakao Talk Message, the APIs used are distinguished according to the message targets.
| Target | Description |
|---|---|
| Send to me | Sends a message to the "Me" chat in Kakao Talk of the currently logged-in user. This feature cannot send messages to other users and can only send messages to the logged-in user themselves. |
| Send to friends | Sends a message to friends in Kakao Talk of the currently logged-in user. Important: Additional feature request is required. You must implement a process to receive recipient information through Picker or Retrieve Kakao Talk friends list. You can send messages to up to 5 friends at once. Daily and monthly quotas are set, so refer to Quota. |
If you want to send messages to friends, Request permission is required. See Usage Policy as well.
| Reference | App setting |
|---|---|
Kakao.API.request() | Install Initialize |
| Permission | Prerequisite | Kakao Login | Consent items |
|---|---|---|---|
| - | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Consent items | Required | Required: Send message in Kakao Talk (talk_message) |
Sends a message to the user's My Chatroom using the predefined default template in JSON format.
First, you need to configure objects according to the desired template type. For configuration methods, refer to Default template.
When calling the Kakao.API.request() function, pass the previously configured template object as the template_object parameter.
Kakao.API.request() returns a Promise. For the response content when the request succeeds, refer to REST API.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v2/api/talk/memo/default/send. | O |
| data | Object | Parameters to pass to the API. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| template_object | Object | Object containing message components One of Feed, List, Location, Commerce, Text, Calendar | O |
Kakao.API.request({url: '/v2/api/talk/memo/default/send',data: {template_object: {object_type: 'feed',content: {title: 'Strawberry cheese cake',description: '#cake #strawberry #cafe #atmosphere #blinddate',image_url: 'https://mud-kage.kakao.com/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png',link: {web_url: 'https://developers.kakao.com',mobile_web_url: 'https://developers.kakao.com',},},item_content: {profile_text: 'Kakao',profile_image_url: 'https://mud-kage.kakao.com/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png',title_image_url: 'https://mud-kage.kakao.com/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',},{item: 'Cake4',item_op: '4000 won',},{item: 'Cake5',item_op: '5000 won',},],sum: 'Total',sum_op: '15000 won',},social: {like_count: 100,comment_count: 200,},buttons: [{title: 'View on Web',link: {mobile_web_url: 'https://developers.kakao.com',web_url: 'https://developers.kakao.com',},},{title: 'View on App',link: {mobile_web_url: 'https://developers.kakao.com',web_url: 'https://developers.kakao.com',},},],},},}).then(function (response) {console.log(response)}).catch(function (error) {console.log(error)})
| Reference | App setting |
|---|---|
Kakao.API.request() | Install Initialize |
| Permission | Prerequisite | Kakao Login | Consent items |
|---|---|---|---|
| - | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Consent items Message template | Required | Required: 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].
When calling the Kakao.API.request() function, you must pass the custom template ID as the template_id parameter.
Kakao.API.request() returns a Promise. For the response content when the request succeeds, refer to REST API.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v2/api/talk/memo/send. | O |
| data | Object | Parameters to pass to the API. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| template_id | Number | Message template ID configured in [Tools] > [Message Template]. | O |
| template_args | Object | Required when the message template specified by template_id uses user argumentsPass in key:value formatImportant: If you do not use this parameter even though the custom template uses 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 |
Kakao.API.request({url: '/v2/api/talk/memo/send',data: {template_id: ${YOUR_TEMPLATE_ID},},}).then(function(response) {console.log(response);}).catch(function(error) {console.log(error);});
| Reference | App setting |
|---|---|
Kakao.API.request() | Install Initialize |
| Permission | Prerequisite | Kakao Login | Consent items |
|---|---|---|---|
| - | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Consent items | Required | Required: 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.
If you need to send to other users, use the Send scrape message API.
When calling the Kakao.API.request() function, you must pass the web page URL to scrape as the request_url parameter. The domain of the web page to be scraped must be registered in [App] > [Product Link] > [Web domain] on the app management page.
Kakao.API.request() returns a Promise. For the response content when the request succeeds, refer to REST API.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v2/api/talk/memo/scrap/send. | O |
| data | Object | Parameters to pass to the API. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| request_url | String | Web page URL to be scraped Important: Only domains registered in [App] > [Product Link] > [Web domain] on the app management page can be used | O |
| template_id | Number | Message template ID configured in [Tools] > [Message Template] Used when you want to send scrape messages based on service-defined message templates (Refer to: Custom template) | X |
| template_args | Object | Required when the message template specified by template_id uses user argumentsPass in key:value formatCannot overwrite (overwrite) scrape results Important: If you do not use this parameter even though the custom template uses 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 |
Kakao.API.request({url: '/v2/api/talk/memo/scrap/send',data: {request_url: 'https://developers.kakao.com',},}).then(function (response) {console.log(response)}).catch(function (error) {console.log(error)})
Kakao.API.request({url: '/v2/api/talk/memo/scrap/send',data: {request_url: 'https://developers.kakao.com',template_id: ${YOUR_TEMPLATE_ID},},}).then(function(response) {console.log(response);}).catch(function(error) {console.log(error);});
| Reference | App setting |
|---|---|
Kakao.API.request() | Install Initialize |
| Permission | Prerequisite | Kakao Login | Consent items |
|---|---|---|---|
| Required: Permission | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Consent items | Required | Required: Send message in Kakao Talk (talk_message) |
Sends a message composed in JSON according to the predefined default template format.
First, you need to configure objects according to the desired template type. For configuration methods, refer to Default template.
When calling the Kakao.API.request() function, pass the previously configured template object as the template_object parameter.
Kakao.API.request() returns a Promise. For the response content when the request succeeds, refer to REST API.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v1/api/talk/friends/message/default/send. | O |
| data | Object | Parameters to pass to the API. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| receiver_uuids | String[] | User uuid values obtained through Picker or Retrieve Kakao Talk friends list API Can send messages to up to 5 users at once | O |
| template_object | Object | Object containing message components One of Feed, List, Location, Commerce, Text, Calendar | O |
Kakao.API.request({url: '/v1/api/talk/friends/message/default/send',data: {receiver_uuids: ['${RECEIVER_UUID}'],template_object: {object_type: 'feed',content: {title: 'Strawberry cheese cake',description: '#cake #strawberry #cafe #atmosphere #blinddate',image_url: 'https://mud-kage.kakao.com/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png',link: {web_url: 'https://developers.kakao.com',mobile_web_url: 'https://developers.kakao.com',},},item_content: {profile_text: 'Kakao',profile_image_url: 'https://mud-kage.kakao.com/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png',title_image_url: 'https://mud-kage.kakao.com/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',},{item: 'Cake4',item_op: '4000 won',},{item: 'Cake5',item_op: '5000 won',},],sum: 'Total',sum_op: '15000 won',},social: {like_count: 100,comment_count: 200,},buttons: [{title: 'View on Web',link: {mobile_web_url: 'https://developers.kakao.com',web_url: 'https://developers.kakao.com',},},{title: 'View on App',link: {mobile_web_url: 'https://developers.kakao.com',web_url: 'https://developers.kakao.com',},},],},},}).then(function (response) {console.log(response)}).catch(function (error) {console.log(error)})
| Reference | App setting |
|---|---|
Kakao.API.request() | Install Initialize |
| Permission | Prerequisite | Kakao Login | Consent items |
|---|---|---|---|
| Required: Permission | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Consent items Message template | Required | Required: Send message in Kakao Talk (talk_message) |
Sends a message using a custom template configured in [Tools] > [Message Template].
When calling the Kakao.API.request() function, you must pass the custom template ID as the template_id parameter.
Kakao.API.request() returns a Promise. For the response content when the request succeeds, refer to REST API.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v1/api/talk/friends/message/send. | O |
| data | Object | Parameters to pass to the API. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| receiver_uuids | String[] | User uuid values obtained through Picker or Retrieve Kakao Talk friends list API Can send messages to up to 5 users at once | O |
| template_id | Number | Message template ID configured in [Tools] > [Message Template]. | O |
| template_args | Object | Required when the message template specified by template_id uses user argumentsPass in key:value formatImportant: If you do not use this parameter even though the custom template uses 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 |
Kakao.API.request({url: '/v1/api/talk/friends/message/send',data: {receiver_uuids: ['${RECEIVER_UUID}'],template_id: ${YOUR_TEMPLATE_ID},},}).then(function(response) {console.log(response);}).catch(function(error) {console.log(error);});
| Reference | App setting |
|---|---|
Kakao.API.request() | Install Initialize |
| Permission | Prerequisite | Kakao Login | Consent items |
|---|---|---|---|
| Required: Permission | JavaScript key Product Link JavaScript SDK domain Activate Kakao Login Consent items | Required | Required: Send message in Kakao Talk (talk_message) |
Sends a scrape message using information extracted from the specified web page URL.
When calling the Kakao.API.request() function, you must pass the web page URL to scrape as the request_url parameter. The domain of the web page to be scraped must be registered in [App] > [Product Link] > [Web domain] on the app management page.
Kakao.API.request() returns a Promise. For the response content when the request succeeds, refer to REST API.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v1/api/talk/friends/message/scrap/send. | O |
| data | Object | Parameters to pass to the API. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| receiver_uuids | String[] | User uuid values obtained through Picker or Retrieve Kakao Talk friends list API. Can send messages to up to 5 users at once. | O |
| request_url | String | Web page URL to be scraped. Important: Only domains registered in [App] > [Product Link] > [Web domain] on the app management page can be used. | O |
| template_id | Number | Message template ID configured in [Tools] > [Message Template]. Used when you want to send a scrape message with the template registered in [Tools] > [Message Template]. Specify the ID of the template to apply. When you use this parameter, the scraped content is applied in the template with the specified template_id. | X |
| template_args | Object | If you specify template_id and the specified template contains other user arguments besides the default argument keys, pass the user arguments using this parameter in key:value format.Cannot overwrite scrape results. Important: If you do not use this parameter even though the custom template uses 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 |
Kakao.API.request({url: '/v1/api/talk/friends/message/scrap/send',data: {receiver_uuids: ['${RECEIVER_UUID}'],request_url: 'https://developers.kakao.com',},}).then(function (response) {console.log(response)}).catch(function (error) {console.log(error)})
Kakao.API.request({url: '/v1/api/talk/friends/message/scrap/send',data: {receiver_uuids: ['${RECEIVER_UUID}'],request_url: 'https://developers.kakao.com',template_id: ${YOUR_TEMPLATE_ID},},}).then(function(response) {console.log(response);}).catch(function(error) {console.log(error);});
You can attach images to a message by passing an image URL when configuring a message template or by uploading images in the Message template tool in advance. For detailed instructions and examples, see Upload image.