페이지 이동경로
  • Docs>
  • Kakao Login>
  • Callback

Kakao Login

Callback

This document introduces callback information for Kakao Login.

Before you begin

Check the Usage policy before using the callback.

Unlink callback

Basic information
Method URL Authorization
GET/POST Callback URL registered in [My Application] > [Kakao Login] > [Unlink].
(Example: https://example.com/unlink/callback)
Service app admin key
Permission Prerequisite Kakao Login User consent
- Activate Kakao Login
Set unlink callback
- -

The Unlink callback feature sends you a callback when a user unlinks from a service app. Ensure that you cannot get an unlink callback if you request the Unlink API in your service app to unlink a specific user from your service.

Kakao sends an unlink callback in any of the following cases. To figure out which case a user corresponds to among these, check the value of referrer_type in the unlink callback request:

  • If a user deletes the Kakao Account.
  • If a user's Kakao Account is deleted through Customer Service or deleted four years after the account has been switched to a dormant state.
  • If a user selects [Disconnect] on the 'Manage Connected Services' page.
  • If a user requests to unlink through the Kakao Customer service.
  • If a user has not completed a signup.
What you must do
  1. Allow Kakao IP addresses.
  2. Set an unlink callback in [My Application] > [Kakao Login] > [Unlink].
  3. Implement a function to receive and process the callback request that the Kakao server has made. For example, first check if the Admin key in the callback request sent from the Kakao server is correct. If so, delete or disable the user information from the service server, and proceed other jobs that need to go with the process.
  4. When you get an unlink callback, you must respond to the request within 3 seconds with the HTTP status code 200 OK by sending a callback response to the Kakao server.
    • Note that the Kakao server sends a callback after unlinking the user from the app.
    • The Kakao server determines success or failure with the HTTP status code. The response body in your callback response is ignored.
    • You must respond with the HTTP status code "200 OK" in all cases. Other status codes, except for 200 OK are considered failures.
    • You must respond with the HTTP status code 200 OK when you fail to delete the user information or fail to find the user. Process the user information internally after responding.
  5. Process the user data stored in the service DB, such as deleting or disabling the account according to your service policy. After the unlink process, users cannot use the service anymore with the Kakao Accounts.

Below is the detailed information of the unlink 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 Required
app_id String App ID that a user requests to unlink from. O
user_id String Service user ID of a user who requests to unlink. O
referrer_type String The route of a user requests to unlink.

One of the followings:
- ACCOUNT_DELETE: If a user deletes the Kakao Account.
- FORCED_ACCOUNT_DELETE: If a user's Kakao Account is deleted through Customer Service or deleted after a four-year dormant state.
- UNLINK_FROM_APPS: If a user selects [Disconnect] on 'Manage Connected Services'.
- UNLINK_FROM_ADMIN: If a user requests to unlink through the Kakao Customer service.
- INCOMPLETE_SIGN_UP: If a user has not completed a signup. (Refer to Notice)
O

Sample

Callback Request
curl -v -G GET "{UNLINK_CALLBACK_URL}?app_id=123456&user_id=1234567890&referrer_type=UNLINK_FROM_APPS" \
    -H "Authorization: KakaoAK ${SERVICE_APP_ADMIN_KEY}"
curl -v -X POST "{UNLINK_CALLBACK_URL}" \
    -H "Authorization: KakaoAK ${SERVICE_APP_ADMIN_KEY}" \
    --data-urlencode "app_id=123456" \
    --data-urlencode "user_id=1234567890" \
    --data-urlencode "referrer_type=UNLINK_FROM_APPS"
How do I check if the unlink callback is set successfully?

You can test if the unlink callback is working by unlinking an account with the service in [Settings] > [Kakao Account] > [Manage Connected Services] on Kakao Talk application or [Use Your Account] > [Manage Connected Services] on the Kakao Account page.

Kakao Login> Callback