SDK initialization
Call initializeKakaoSDK(appKey, options) to initialize Kakao. Its Promise<void> resolves after the Android/iOS SDK or web JavaScript SDK finishes initialization. Await it before calling other Kakao APIs.
Pass the native app key inside your app's asynchronous initialization function.
import { initializeKakaoSDK } from '@react-native-kakao/core';
await initializeKakaoSDK('{{ native app key }}');
Native options
Android and iOS support a custom URL scheme and internal SDK logging. Web ignores these two options.
| Option | Default | Meaning |
|---|---|---|
customScheme | kakao{native app key} | URL scheme for SDK authentication and share callbacks, without :// |
loggingEnabled | false | Whether to enable internal Kakao native SDK logging |
android.sdkIdentifier | Omitted | Wrapper SDK identifier appended unchanged to Android's KA request header; ignored on iOS and web |
In iOS SDK 2.29.0, Debug builds write console logs independently of this setting. Use refreshToken's ios.loggingEnabled to hide a refresh request's logs and response body.
The custom scheme must match the configuration registered with Kakao Developers. Follow the official multi-app guide when maintaining an existing multi-app setup. An arbitrary scheme cannot receive a real login callback.
await initializeKakaoSDK('{{ native app key }}', {
customScheme: '{{ registered custom scheme }}',
loggingEnabled: false,
});
With Expo, set the same customScheme in the core plugin and run prebuild again. The plugin applies it to enabled Android authentication, channel, shipping, certification, and share callbacks, and to the iOS URL type.
[
"@react-native-kakao/core",
{
"nativeAppKey": "{{ native app key }}",
"customScheme": "{{ registered custom scheme }}",
"android": { "authCodeHandlerActivity": true },
"ios": { "handleKakaoOpenUrl": true }
}
]
Without Expo, update the callback schemes in AndroidManifest.xml and iOS Info.plist yourself. Changing the SDK initialization option alone does not change the OS URL registration.
Set android.sdkIdentifier to identify a wrapper SDK on Android. Kakao appends the string unchanged to its KA header. Include a leading space to separate it from existing header fields, as shown below. This runtime option does not require Expo plugin configuration.
await initializeKakaoSDK('{{ native app key }}', {
android: { sdkIdentifier: ' wrapper/my-sdk' },
});
Web initialization
Load the JavaScript SDK script first, then provide both the JavaScript key and REST API key under web. See Web setup for script installation.
await initializeKakaoSDK('{{ native app key }}', {
web: {
javascriptKey: '{{ javascript key }}',
restApiKey: '{{ rest api key }}',
},
});
SDK information
Use getKakaoSDKInfo() to inspect the actual SDK version and initialization state. An overridden SDK version is reported as installed.
import { getKakaoSDKInfo } from '@react-native-kakao/core';
const { version, isInitialized } = await getKakaoSDKInfo();
| Field | Platforms | Meaning |
|---|---|---|
version | Android, iOS, web | Current Kakao SDK version |
isInitialized | Android, iOS, web | Whether the SDK has been initialized |
appKey | Android, iOS | Native app key used during initialization; omitted before initialization |
kaHeader | Android, iOS | SDK KA request header; omitted before initialization |
redirectUri | Android, iOS | {scheme}://oauth for the current scheme; omitted before initialization |
loggingEnabled | Android, iOS | Whether internal SDK logging is enabled |
Web responses contain only version and isInitialized.