페이지 이동경로
  • Docs>
  • Kakao Talk Channel>
  • Callback

Kakao Talk Channel

Callback

This document introduces callback information for Kakao Talk Channel.

Before you begin

Check the Usage policy before using the callback.

Kakao Talk Channel callback

Basic information
Method URL Authorization
POST Callback URL registered in 'Callback for adding/blocking Kakao Talk Channel'.
(Example: https://example.com/channel/callback)
Service app admin key
Permission Prerequisite Kakao Login User consent
- Activate Kakao Login
Set Kakao Talk Channel callback
- -

If you apply the Kakao Talk Channel callback, you can get notified when a user adds or blocks your service's Kakao Talk Channel, and update the user information.

If an app user adds or blocks one of the Kakao Talk Channels on the list of 'Connected business channels', the Kakao server sends a callback to the registered callback URL in the predefined format. Then, you need to implement a function to receive and process the request that the Kakao server has made.

What you must do
  1. Allow Kakao IP addresses.
  2. Set a Kakao Talk Channel callback in [My Application] > [Kakao Login] > [Kakao Talk Channel] > [Callback for adding/blocking Kakao Talk Channel].
  3. Implement a function to receive and process the callback request that the Kakao server has made.
  4. When you get the Kakao Talk Channel callback, you must respond back to the request within 3 seconds with the HTTP status code "200 OK" by sending a callback response to the Kakao server.

Ensure that the other status codes except for "200 OK" are considered as failure. The status codes in the Redirection 3xx class are also not supported. Since the Kakao server determines success or failure with the HTTP status code, the response body in your callback response is ignored.

Below is the detailed information of the Kakao Talk Channel callback that Kakao sends to your service server.

Request

Header
Name Description Required
Authorization Admin key used to validate your app.
KakaoAK ${SERVICE_APP_ADMIN_KEY}
O
Parameter
Name Type Description
event String Changed status of the relationship between a user and a Kakao Talk Channel.
added or blocked.
id String Service user ID who added or blocked a Kakao Talk Channel.
id_type String A type of service user ID.

Either app_user_id or open_id.
- app_user_id: a user who has agreed to provide 'Kakao Talk Channel addition status and details' among Kakao Login consent items.
- open_id: a user who has not agreed to provide 'Kakao Talk Channel addition status and details' among Kakao Login consent items.
channel_public_id String Kakao Talk Channel profile ID that a user added or blocked.

NOTE: plus_friend_public_id has been deprecated and replaced with channel_public_id.
channel_uuid String Kakao Talk Channel profile ID for search purpose.

NOTE: plus_friend_uuid has been deprecated and replaced with channel_uuid.
updated_at Datetime The time when a Kakao Talk Channel is added or blocked in UTC*.

NOTE: timestamp (in milliseconds) has been deprecated and replaced with updated_at (in UTC).

*The time is based on Coordinated Universal Time(UTC), being 9 hours behind Korean Standard Time(KST). For the format of time, refer to RFC3339: Date and Time on the Internet.

Sample

Callback Request
curl -X POST "{KAKAOTALK_CHANNEL_CALLBACK_URL}"  \
  -H "Authorization: KakaoAK ${SERVICE_APP_ADMIN_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
        "event":"added",
        "id":"1111",
        "id_type":"app_user_id",
        "channel_public_id":"_FLX",         
        "channel_uuid":"@ad",                
        "updated_at":"2020-01-01T00:00:00Z"
    }'