페이지 이동경로
  • Docs>
  • Kakao Sync

Kakao Sync

Retrieve user agreed terms

IMPORTANT

This API is only allowed for the service that adopted Kakao Sync. To see the advantages of Kakao Sync, refer to Concept > Kakao Sync. Before implementing this API, read Design terms and policies.

This document contains how to check user agreed terms using the Legacy SDK for Android and iOS. We recommend using the latest SDK for Android and iOS.

If you develop with other languages, see the following development guides:

Tag used in this document
Tag Description
Login required The API marked with this tag requires Kakao Login. You must implement the Kakao Login function first, and then call the corresponding API by using the access token issued when a user logs in.

Legacy Android Login required

Before you begin

To use this API on the Legacy Android,

  • A user must be in a logged-in state.
  • You must add the usermgmt module by referring to Install SDK.
How to implement

Call the UserManagement.serviceTerms() method to request the terms that a user has consented. To use this method, you must implement ApiResponseCallback that handles the response.

The response is the same as Web.

UserManagement.getInstance().serviceTerms(new
  ApiResponseCallback<ServiceTermsResponse>() {
    @Override
    public void onSessionClosed(ErrorResult errorResult) {
      // Login is required.
    }
    @Override
    public void onFailure(ErrorResult errorResult) {
      // Other errors
    }
    @Override
    public void onSuccess(ServiceTermsResponse result) {
      // Success callback
    }
});

Legacy iOS Login required

Before you begin

To use this API on the Legacy iOS,

  • You must implement Kakao Login beforehand.
  • A user has been logged in with a Kakao Account.
How to implement

Call the serviceTermsTask method to request the terms which a user has consented to.

The response is the same as the response of the Web. Refer to the Response of Web for more details of response.

KOSessionTask.serviceTermsTask(completionHandler: { (serviceTerms, error) in
    if let error = error as NSError? {
        print(error)
    }
    else {
        if let serviceTerms = serviceTerms {
            if let allowedTerms = serviceTerms.allowedTerms as [KOServiceTerms]? {
                for (index, terms) in allowedTerms.enumerated() {
                    print("[\(index)] tag:\(String(describing: terms.tag)) agreedAt:\(String(describing: terms.agreedAt))")
                }
            }
        }
    }
})

See more

Legacy Android

Legacy iOS