페이지 이동경로
  • Docs>
  • JavaScript>
  • Getting started

JavaScript

Getting started

This document guides how to use the Kakao SDK for JavaScript("JavaScript SDK") provided by the Kakao API platform.

Before you begin

Supported web browser

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.

Platform

Before using the JavaScript SDK, register the web platform information in [My Application] > [Platform]. Refer to Platform.

Install

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>

Initialize SDK

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>

Demo

A demo for JavaScript SDK is available in [Tools] > [JS SDK demo].

See more