사이드 메뉴
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
Legacy JavaScript
This document describes how to integrate Kakao Talk Message APIs into your service with JavaScript SDK v1 (also referred to as 'Legacy JavaScript SDK').
The new version of the JavaScript SDK has been released to provide a better service. We highly recommend upgrading to the new SDK because the Legacy JavaScript SDK may be deprecated after a certain period of time.
- 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.
According to your service's purpose and requirements, you need to decide which API to use first by considering their characteristics and difference.
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.
Decide which message template to use by referring to Message 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.
Note that the Kakao Talk Message APIs are categorized according to the message targets:
- Send to me: Provides a feature to send a message to the currently logged-in user through Kakao Talk that is linked to the user's Kakao Account. This API is only allowed to send a message to the currently logged-in user, not to the user's friends.
- Send to friends: Provides a feature to send a message to user's friends through Kakao Talk that is linked to the Kakao Account of the currently logged-in user. You need to implement a process to get information about the message recipients through the Friends picker or the Retrieving a list of Kakao Talk friends API. Users can send a message to up to 5 friends at a time. The Kakao Talk Message API provides daily and monthly quotas. Refer to the quota.
To send a Kakao Talk message to friends,
- Get permission. Before permission is granted to your app, you can only retrieve the list of the team members.
- Enable the 'Send message in Kakao Talk' scope in [Kakao Login] > [Consent Items] on the app management page. A user must also consent to the scope. To see more about the conditions for providing friend information, refer to Usage policy.
The JavaScript SDK v1 does not provide the Kakao Talk Message API as a built-in function. To implement the Kakao Talk Message API on a web page, make a request in the same content as a REST API using the Kakao.API.request() function. According to the desired message type, the required components of the message and the API to call are different. Refer to Message template components and samples.
| Message type | Configuration method | Target | API to call |
|---|---|---|---|
| Feed, List, Location, Commerce, Text | Default template | Me (MyChatroom) | /v2/api/talk/memo/default/send |
| Feed, List, Location, Commerce, Text | Default template | Friends | /v1/api/talk/friends/message/default/send |
| Feed, List, Commerce | Custom template | Me (MyChatroom) | /v2/api/talk/memo/send |
| Feed, List, Commerce | Custom template | Friends | /v1/api/talk/friends/message/send |
| Scrape | Default template | Me (MyChatroom) | /v2/api/talk/memo/scrap/send |
| Scrape | Default template | Friends | /v1/api/talk/friends/message/scrap/send |
| Scrape | Custom template | Me (MyChatroom) | /v2/api/talk/memo/scrap/send |
| Scrape | Custom template | Friends | /v1/api/talk/friends/message/scrap/send |
Messages sent through Kakao Talk Share include a link to open the specified web page or app. The buttons in the message launch the app through a Custom URL Scheme consisting of a URI scheme and parameters. Refer to Set Custom URL Scheme for more details.
This API enables you to configure a message as an object type according to the default template type to use. Pass the configured template_object through the data parameter.
To send a message to friends, obtain the receiving users' uuids through the Friends picker or the Retrieving list of friends API, and then pass the uuids as the receiver_uuids parameter. You can send a message to up to five friends at once.
If the request is successful, the result is returned in the same as the REST API. Refer to response of Sending me with default template API.
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| - | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Manage consent items | Required | Required: Send message in Kakao Talk |
Call the Kakao.API.request() function, and set url to /v2/api/talk/memo/default/send.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v2/api/talk/memo/default/send. | O |
| success | Function(Object) | Callback function that gets invoked when the API request is successful. | X |
| fail | Function(Object) | Callback function that gets invoked if the API request is failed. | X |
| always | Function(Object) | Callback function that gets invoked regardless of the API request results. | X |
| data | Object | Object containing parameters to be passed through API. Refer to data: Sending me message with default template. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| template_object | Object | Object containing the message components. One of Feed, List, Location, Commerce, Text. | O |
Kakao.API.request({url: '/v2/api/talk/memo/default/send',data: {template_object: {object_type: 'feed',content: {title: 'Kakao Talk Link',description: 'Feed template',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: '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',},{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,},button_title: 'Check it out',},},success: function (response) {console.log(response)},fail: function (error) {console.log(error)},})
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| Required | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Manage consent items | Required | Required: Send message in Kakao Talk |
Call the Kakao.API.request() function, and set url to v1/api/talk/friends/message/default/send.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to v1/api/talk/friends/message/default/send. | O |
| success | Function(Object) | Callback function that gets invoked when the API request is successful. | X |
| fail | Function(Object) | Callback function that gets invoked if the API request is failed. | X |
| always | Function(Object) | Callback function that gets invoked regardless of the API request results. | X |
| data | Object | Object containing parameters to be passed through API. Refer to data: Sending friends message with default template. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| receiver_uuids | String[] | uuid obtained through the Friends picker or the Retrieving list of friends API.Up to five uuids are allowed. | O |
| template_object | Object | Object containing the message components. One of Feed, List, Location, Commerce, Text. | O |
Kakao.API.request({url: '/v1/api/talk/friends/message/default/send',data: {receiver_uuids: ['receiver_uuids'],template_object: {object_type: 'feed',content: {title: 'Kakao Talk Link',description: 'Feed template',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: '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',},{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,},button_title: 'Check it out',},},success: function (response) {console.log(response)},fail: function (error) {console.log(error)},})
Unlike the Sending message with default template, you can customize a template in [Tools] > [Message Template Builder] to send a message.
Set template_id to the template ID of the custom template registered in [Message Template Builder]. If you use user arguments for some components when you configure a custom message to input variable information, you must also pass key and value pairs as the value of template_args. Otherwise, the defined argument is displayed to users as raw data, such as ${key}.
To send a message to friends, obtain the receiving users' uuids through the Friends picker or the Retrieving list of friends API, and then pass the uuids as the receiver_uuids parameter. You can send a message to up to five friends at once.
If the request is successful, the result is returned in the same as the REST API. Refer to response of Sending me with custom template API.
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| - | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Manage consent items Message Template | Required | Required: Send message in Kakao Talk |
Call the Kakao.API.request() function, and set url to /v2/api/talk/memo/send.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v2/api/talk/memo/send. | O |
| success | Function(Object) | Callback function that gets invoked when the API request is successful. | X |
| fail | Function(Object) | Callback function that gets invoked if the API request is failed. | X |
| always | Function(Object) | Callback function that gets invoked regardless of the API request results. | X |
| data | Object | Object containing parameters to be passed through API. Refer to data: Sending me message with custom template. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| template_id | Number | Template ID of the custom message registered in [Tools] > [Message Template Builder]. | O |
| template_args | Object | If the specified template contains a user argument, use this parameter to pass key-value pairs. You cannot overwrite the scrape result. | X |
Kakao.API.request({url: '/v2/api/talk/memo/send',data: {template_id: ${YOUR_TEMPLATE_ID},},success: function(response) {console.log(response);},fail: function(error) {console.log(error);},});
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| Required | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Manage consent items Message Template | Required | Required: Send message in Kakao Talk |
Call the Kakao.API.request() function, and set url to /v1/api/talk/friends/message/send.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v1/api/talk/friends/message/send. | O |
| success | Function(Object) | Callback function that gets invoked when the API request is successful. | X |
| fail | Function(Object) | Callback function that gets invoked if the API request is failed. | X |
| always | Function(Object) | Callback function that gets invoked regardless of the API request results. | X |
| data | CustomTemplateObject | Object containing parameters to be passed through API. Refer to data: Sending friends message with custom template. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| receiver_uuids | String[] | uuid obtained through the Friends picker or the Retrieving list of friends API.Up to five uuids are allowed. | O |
| template_id | Number | Template ID of the custom message registered in [Tools] > [Message Template Builder]. | O |
| template_args | Object | If the specified template contains a user argument, use this parameter to pass key-value pairs. You cannot overwrite the scrape result. | X |
Kakao.API.request({url: '/v1/api/talk/friends/message/send',data: {receiver_uuids: ['receiver_uuids'],template_id: ${YOUR_TEMPLATE_ID},},success: function(response) {console.log(response);},fail: function(error) {console.log(error);},});
This API scrapes a web page, and then configures a message based on the scraped web page information to send a message.
When you request to send a scrape message, you must pass request_url, a web page to be scraped. Make sure that you have registered the domain of the web page to be scraped as a website domain in [App] > [Product Link] > [Web domain] on the app management page in advance.
To send a message to friends, obtain the receiving users' uuids through the Friends picker or the Retrieving list of friends API, and then pass the uuids as the receiver_uuids parameter. You can send a message to up to five friends at once.
If the request is successful, the result is returned in the same as the REST API. Refer to response of Sending scrape message with default template API.
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| - | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Manage consent items | Required | Required: Send message in Kakao Talk |
Call the Kakao.API.request() function, and set url to /v2/api/talk/memo/scrap/send.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v2/api/talk/memo/scrap/send. | O |
| success | Function(Object) | Callback function that gets invoked when the API request is successful. | X |
| fail | Function(Object) | Callback function that gets invoked if the API request is failed. | X |
| always | Function(Object) | Callback function that gets invoked regardless of the API request results. | X |
| data | Object | Object containing parameters to be passed through API. Refer to data: Sending me scrape message with default template. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| request_url | String | Web 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 |
Kakao.API.request({url: '/v2/api/talk/memo/scrap/send',data: {request_url: '${SITE_URL}',},success: function (response) {console.log(response)},fail: function (error) {console.log(error)},})
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| Required | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Manage consent items | Required | Required: Send message in Kakao Talk |
Call the Kakao.API.request() function, and set url to /v1/api/talk/friends/message/scrap/send.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v1/api/talk/friends/message/scrap/send. | O |
| success | Function(Object) | Callback function that gets invoked when the API request is successful. | X |
| fail | Function(Object) | Callback function that gets invoked if the API request is failed. | X |
| always | Function(Object) | Callback function that gets invoked regardless of the API request results. | X |
| data | Object | Object containing parameters to be passed through API. Refer to data: Sending friends scrape message with default template. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| receiver_uuids | String[] | uuid obtained through the Friends picker or the Retrieving list of friends API.Up to five uuids are allowed. | O |
| request_url | String | Web 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 |
Kakao.API.request({url: '/v1/api/talk/friends/message/scrap/send',data: {receiver_uuids: ['receiver_uuids'],request_url: '${SITE_URL}',},success: function (response) {console.log(response)},fail: function (error) {console.log(error)},})
This API scrapes a web page, and then configures a message based on the scraped web page information to send a message. Unlike the Sending scrape message with default template, you can use a custom template registered in [Tools] > [Message Template Builder] when requesting to send a scrape message.
When you request to send a scrape message, you must pass request_url, a web page to be scraped. Make sure that you have registered the domain of the web page to be scraped as a web domain in [App] > [Product Link] > [Web domain] on the app management page in advance.
Set template_id to the template ID of the custom template registered in [Message Template Builder]. If you use user arguments for some components when you configure a custom message to input variable information, you must also pass key and value pairs as the value of template_args. Otherwise, the defined argument is displayed to users as raw data, such as ${key}.
To send a message to friends, obtain the receiving users' uuids through the Friends picker or the Retrieving list of friends API, and then pass the uuids as the receiver_uuids parameter. You can send a message to up to five friends at once.
If the request is successful, the result is returned in the same as the REST API. Refer to response of Sending scrape message with custom template API.
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| - | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Manage consent items Message Template | Required | Required: Send message in Kakao Talk |
Call the Kakao.API.request() function, and set url to /v2/api/talk/memo/scrap/send.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v2/api/talk/memo/scrap/send. | O |
| success | Function(Object) | Callback function that gets invoked when the API request is successful. | X |
| fail | Function(Object) | Callback function that gets invoked if the API request is failed. | X |
| always | Function(Object) | Callback function that gets invoked regardless of the API request results. | X |
| data | Object | Object containing parameters to be passed through API. Refer to data: Sending me scrape message with custom template=. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| request_url | String | Web page URL to be scraped. Its domain must match the [App] > [Product Link] > [Web domain] on the app management page. | O |
| template_id | Number | Used when you want to send a scrape message with the template registered in [Tools] > [Message Template Builder]. 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. | O |
| 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.You cannot overwrite the scrape result. | X |
Kakao.API.request({url: '/v2/api/talk/memo/scrap/send',data: {request_url: '${SITE_URL}',template_id: ${YOUR_TEMPLATE_ID}},success: function(response) {console.log(response);},fail: function(error) {console.log(error);},});
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| Required | JavaScript key JavaScript SDK domain Product Link Activate Kakao Login Manage consent items Message Template | Required | Required: Send message in Kakao Talk |
Call the Kakao.API.request() function, and set url to /v1/api/talk/friends/message/scrap/send.
| Name | Type | Description | Required |
|---|---|---|---|
| url | String | Fixed to /v1/api/talk/friends/message/scrap/send. | O |
| success | Function(Object) | Callback function that gets invoked when the API request is successful. | X |
| fail | Function(Object) | Callback function that gets invoked if the API request is failed. | X |
| always | Function(Object) | Callback function that gets invoked regardless of the API request results. | X |
| data | Object | Object containing parameters to be passed through API. Refer to data: Sending friends scrape message with custom template. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| receiver_uuids | String[] | uuid obtained through the Friends picker or the Retrieving list of friends API.Up to five uuids are allowed. | O |
| request_url | String | Web page URL to be scraped. Its domain must match the [App] > [Product Link] > [Web domain] on the app management page. | O |
| template_id | Number | Used when you want to send a scrape message with the template registered in [Tools] > [Message Template Builder]. 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. | O |
| 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.You cannot overwrite the scrape result. | X |
Kakao.API.request({url: '/v1/api/talk/friends/message/scrap/send',data: {receiver_uuids: ['receiver_uuids'],request_url: '${SITE_URL}',template_id: ${YOUR_TEMPLATE_ID},},success: function(response) {console.log(response);},fail: 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 builder in advance. Refer to Kakao Talk Share: JavaScript > Upload image.