This document walks you through frequently asked questions you may have when you integrate Kakao Login into your service.
If you cannot find such solutions or have further questions, visit the forum for developers called 'DevTalk' and feel free to ask questions. To change the DevTalk interface language to English, see How can I change the DevTalk interface language?.
When an error occurs, you can figure out its cause through the error message in the response.
The errors that commonly occur when calling an API consist of the error code and error message. You can figure out its error type in each reference guide. If you encounter an error during the Kakao Login process, refer to Kakao Login > Troubleshooting.
The "Invalid redirect" error often occurs when you first implement Kakao Login and request to receive an authorization code.
...error="invalid_grant", error_description="Invalid redirect:...
This error occurs when the Redirect URI set in [My Application] > [Kakao Login] > [Redirect URI] mismatches with redirect_uri
used to request an authorization code. You must set Redirect URI used to get an authorization code before requesting this API. If you have already set it, check if the set Redirect URI is exactly the same with the redirect_uri
that is returned through the error message.
Consent type | Description | Solution |
---|---|---|
Consent during use | This type of scope is not included on the Consent screen presented when a user attempts to log in for the first time. | Request additional consent, and then the Consent screen that includes the scope with [Required] prefix is displayed when a user performs an action that requires the scope. |
Required consent | If a user does not have the desired user information, the Required item is not displayed on the Consent screen even though you set the scope to 'Required consent'. | Use the 'Provision after collecting information through Kakao Account' feature. This feature allows you to ask users to input the user information on the Consent screen and to get consent to the use of the information. Note that you cannot use this option for the phone_number scope. |
Except for ID issued for each user or CI as authentication information, all user information is subject to change all the time. To update with the latest information, request the Retrieving user information API once logging in.
Yes. you can get the user information by requesting additional consent. If the information is set to 'Optional consent' item and a user does not agree to provide the information during the Simple Signup process, you can request consent again when the user attempts to use a feature that requires the information. However, if a user refuses to provide the information, you must not allow the user to use the feature.
See User information to check all types of the user information that Kakao provides.
However, to retrieve user information:
No. The Provision after collecting information option is not applicable for the 'Kakao account (phone number)' scope. Kakao gets a user's phone number saved in Kakao Talk linked to the user's Kakao Account. Thus, if a user does not use Kakao Talk, Kakao cannot get the user's phone number even though 'Kakao account (phone number)' is set to 'Required consent' item. In this case, you must collect a phone number separately in your service if phone numbers are required.
The Simple Signup function is available only after your app passes the Kakao Sync review. To see more detailed conditions, see Set Simple Signup > Conditions.
A user's web browser language preference applies to the language displayed on the Kakao Login page and Consent screen.
If you want to specify a particular language for the Consent screen, pass the lang
parameter when getting authorization code.
The supported languages for the Consent screen are as follows:
Language | Value |
---|---|
Korean | ko |
English | en |
Japanese | ja |
Simplified Chinese characters | zh |
https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=${REST_API_KEY}&redirect_uri=${REDIRECT_URI}&lang=en
When tapping the Kakao Login button, it is supposed to launch the Kakao Talk app to log in through Kakao Talk. If the Login screen to input Kakao Account information appears, check if you specify the Auth Type. According to the specified Auth types, Kakao Login works differently, and users can log in with the following information:
When using a REST API, users can log in with their Kakao Accounts and passwords only. On the other hand, the Kakao SDKs provide the following options:
Platform | Parameter | Description |
---|---|---|
JavaScript | throughTalk | Whether to use Kakao Talk Simple Login (Boolean ). |
Android | AuthType | Set a type of user authentication. If not specified, KAKAO_LOGIN_ALL is applied.KAKAO_TALK : Simple Login through Kakao Talk.KAKAO_ACCOUNT : Login by inputting Kakao Account and password on a webView.KAKAO_TALK_EXCLUDE_NATIVE_LOGIN : Simple Login through Kakao Talk. If any Kakao Account is not linked to Kakao Talk, a button to sign up for Kaka Account is provided. Cannot be duplicated with KAKAO_TALK .KAKAO_LOGIN_ALL : Use all authentication types. |
iOS | authType | Set a type of user authentication. If not specified, nil is applied.KOAuthTypeTalk : Simple Login through Kakao Talk.KOAuthTypeAccount : Login by inputting Kakao Account and password on a webView.nil : No option specified. |
Because the SDK predefines a constant for each option above, you do not need to specify it separately.
If a user has already agreed by clicking [Accept and Continue] on Consent screen, the authorization code is issued without the Consent screen displayed. The Consent screen appears the first time when a user links with an app. To display the Consent screen again, unlink from an app and request an authorization code.
If a user logs in with Kakao Talk on the mobile web but is not redirected to your service page or app, it is a normal phenomenon. According to policy on smartphone OS, an app is not allowed to load other apps arbitrarily. Thus, you need to guide users to go back to your service web page in person after the login on the login page. If the users are in logged-in state when they go back to your service page, it is normal.
In the case of a web browser, to figure out if the user is successfully signed up,
For native apps, Kakao login authentication information is managed as a token. There are two types of tokens: an access token used to authenticate a user and a refresh token used to refresh your access token when it expires. Users can log in using the issued access token or refresh token before the tokens are expired as far as they have not logged out. Users do not need to verify user information with Kakao Talk or Kakao Account again during the token validity period.
Even though users are not logged out or tokens are not expired, users may fail to log in again using the tokens. In this case, check the followings:
If using a REST API, check the token information used to request logout.
In the case of the Kakao SDK, when requesting to log out, the SDK deletes your token and cookie, and then you are logged out regardless of the result of logout function. Thus, if you cannot log out, the failure may be caused by other issues, not related to the Logout API operation.
No. As of now, this feature is not available. Kakao Account supports the multi-device feature, which means that you can log in with Kakao Account on multiple devices. Thus, if you request to log out, you are logged out of the only device that you are currently using, and the logged-in status remains on the rest devices.
When you attempt to log in with another account after logging out, you may be logged in with the previous account. This issue occurs when the logout process has not been completed normally or a cookie is still stored in your web browser. If a user is logged out successfully, the cookie is deleted along with the access token and the refresh token when using the iOS or Android SDK.
If you use a REST API, only the access token and the refresh token are deleted, and Kakao Account cookies still remain. In this case, you may be logged in with the previous account when you try to authenticate again. Thus, delete the cookie on the web browser, and then retry login.
No. The service user ID is issued to each service user as a unique identifier. Thus, your service ID does not change even when you log out or delete your service account.
Even when a user has agreed to provide user information through the Simple Signup process, a specific scope (user information) may be empty. That is because the user has never entered the information while using the Kakao service. In this case, you can use the Provision after collecting information through Kakao Account option in [My Application] > [Kakao Login] > [Consent items]. Then, Kakao collects the required user information from the user and provides it to your service.
If the Provision after collecting information option is disabled so some user information required for a service is missing, the user is required to input the information when attempting to log in later. Then, update the user information as the user inputs.
However, a user refuses to provide information to Kakao, the item is empty even though you enable this option because Kakao does not retain the information. If the information is required to use your service, you must ask a user to input the information in person during the use of the service or allow the user to cancel the signup.
If the user has already agreed to provide the personal information to a third party before enabling this option, Kakao does not collect the user information even though the service requests consent again. Kakao can collect information after a user unlinks from the service and then re-logs in with Kakao Account.
Yes. If you use the Retrieving consent details API, you can check which consent items a user has agreed to among the scopes set in your app.
You can also use the Retrieving the user information API. Check its response that includes the scopes that the user has agreed to and {FIELD_NAME}_needs_agreement that indicates the corresponding scope requires additional consent.
If you need user's email information but cannot retrieve,
email_needs_agreement
is true
, the user has email information. In this case, request email information again after requesting additional consent.If you must be provided the user's email information, set 'email' to a required scope and provision after collecting information. After setting, request additional consent, and retrieve user information again. However, if this method is not available, you must collect the user's email information by your own process.