사이드 메뉴
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
REST API
This document describes the v1 version of the Checking Kakao Talk Channel relationship API.
| Method | URL | Authorization |
|---|---|---|
GET | https://kapi.kakao.com/v1/api/talk/channels | Access token Service app admin key |
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| Required | Admin key Activate Kakao Login Manage consent items Set Kakao Talk Channel | Required | Required: Kakao Talk Channel addition status and details |
This API enables you to check if a specific user has added or blocked your Kakao Talk Channel connected to your service app.
We provide a new version for checking Kakao Talk Channel relationship API. You can find information of the v1 API in a separate document.
To get a notification when a user adds or blocks one of your Kakao Talk Channels linked to you service, use the Kakao Talk Channel webhook function.
Make sure that this API only informs the relationship between the user and the Kakao Talk Channel connected to the app that made a request. Thus, you cannot get all Kakao Talk Channels' information that the user has added but the channels related to your service only.
If you are an administrator, you can also use the app's Admin key to check the relationship between a Kakao Talk Channel and a specific user. When requesting using the app's Admin key and a service user ID, make a request from the service server by referring to the code snippet and parameters as follows. Make sure to use the app's Admin key only in the server.
Among Kakao Talk Channels that a user has added or blocked, only the channels connected to your service app return in the response in JSON format. Each channel object in the response contains detailed information, such as whether the user adds or blocks the Kakao Talk Channel currently and the time when the channel has been added or blocked.
In the following situations, permission-related error occurs:
- If you set 'Kakao Talk Channel addition status and details' to 'Optional item', a user may not consent to the consent item. In this case, you can request consent from the user again by Requesting additional consent as needed.
| Name | Description | Required |
|---|---|---|
| Authorization | Authorization: Bearer ${ACCESS_TOKEN}Access token as a type of user authentication. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| channel_public_ids | String[] | List of Kakao Talk Channel profile IDs that you want to check the relationship with a user. | O |
| Name | Description | Required |
|---|---|---|
| Authorization | Authorization: KakaoAK ${SERVICE_APP_ADMIN_KEY}Service app admin key as a type of user authentication. | O |
| Content-Type | Content-Type: application/x-www-form-urlencoded;charset=utf-8The data type of the request. | O |
| Name | Type | Description | Required |
|---|---|---|---|
| target_id_type | String | A type of the user ID. Fixed to user_id. | O |
| target_id | Long | Service user ID. | O |
| channel_public_ids | String[] | List of Kakao Talk Channel profile IDs that you want to check the relationship with a user. (Default: A list of all Kakao Talk Channel profile IDs that connected to your service app) | X |
| Name | Type | Description | Required |
|---|---|---|---|
| user_id | Long | Service user ID. | O |
| channels | Channels[] | Kakao Talk Channel information. | X |
| Name | Type | Description | Required |
|---|---|---|---|
| channel_uuid | String | Kakao Talk Channel profile ID for search purpose. | O |
| channel_public_id | String | Kakao Talk Channel profile ID. | O |
| relation | String | Relationship between a Kakao Talk Channel and a user.ADDED: a user has added the channel.BLOCKED: a user has blocked the channel.NONE: a user has not either added or blocked the channel. | O |
| created_at | Datetime | Time when a Kakao Talk Channel is added in UTC*. Only returned if a Kakao Talk Channel is added ( ADDED). | X |
| updated_at | Datetime | Time when a Kakao Talk Channel relationship is changed in UTC*. Only returned if a Kakao Talk Channel is added ( ADDED) or blocked (BLOCKED). | X |
Request: Using access token
curl -v -G GET "https://kapi.kakao.com/v1/api/talk/channels" \-H "Authorization: Bearer ${ACCESS_TOKEN}" \--data-urlencode 'channel_public_ids=["_frxjem","_xnrxjem","_Brxjem"]'
Request: Using admin key
curl -v -G GET "https://kapi.kakao.com/v1/api/talk/channels" \-H "Authorization: KakaoAK ${SERVICE_APP_ADMIN_KEY}" \-d "target_id_type=user_id" \-d "target_id={USER_ID}" \--data-urlencode 'channel_public_ids=["_frxjem","_xnrxjem","_Brxjem"]'
Response: Success
HTTP/1.1 200 OK{"user_id": 1111111,"channels": [{"channel_uuid": "@테스트","channel_public_id": "_ZeUTxl","relation": "ADDED", // One of ADDED, BLOCKED, NONE"created_at": "2020-04-18T03:17:05Z", // Only returned when "relation" is "ADDED"."updated_at": "2021-05-17T05:25:01Z"}, // Only returned when "relation" is "ADDED" or "BLOCKED"....]}
Response: Fail, if requesting for a non-Kakao Talk user
HTTP/1.1 400 Bad Request{"msg": "given account is not connected to any talk user.","code": -501}