This document guides how to use the Kakao SDK for JavaScript("JavaScript SDK") provided by the Kakao API platform.
The JavaScript SDK supports the most commonly used web browsers. Here are the supported web browsers and versions by platform.
Browser / Platform | Android | iOS | macOS | Windows |
---|---|---|---|---|
Chrome* | O | O | O | O |
Edge* | O | O | O | O |
Firefox* | O | O | O | O |
Safari | X | O | O | X |
Internet Explorer (IE) | X | X | X | O** |
* JavaScript SDK supports the latest two versions of Chrome, Edge, and Firefox.
** JavaScript SDK supports IE 11 only.
Before using the JavaScript SDK, register the web platform information in [My Application] > [Platform]. Refer to Platform.
Add a <script>
element to the web page, and specify the version and the integrity
value. To find the latest SDK version, see Download.
<script src="https://t1.kakaocdn.net/kakao_js_sdk/${VERSION}/kakao.min.js"
integrity="${INTEGRITY_VALUE}" crossorigin="anonymous"></script>
To initialize the JavaScript SDK, add the init()
function in the JavaScript file and pass a JavaScript key copied in [My Application] > [App Keys].
Kakao.init('JAVASCRIPT_KEY');
Kakao.isInitialized();
Here is an example of initializing the JavaScript SDK and checking if the initialization is successfully done by calling the isInitialized()
function.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Kakao JavaScript SDK</title>
<script src="https://t1.kakaocdn.net/kakao_js_sdk/${VERSION}/kakao.min.js"
integrity="${INTEGRITY_VALUE}" crossorigin="anonymous"></script>
<script>
// Initialize SDK with JavaScript key for your app.
Kakao.init('JAVASCRIPT_KEY');
// Check if the initialization is successfully done.
console.log(Kakao.isInitialized());
</script>
</head>
<body></body>
</html>
A demo for JavaScript SDK is available in [Tools] > [JS SDK demo].